Keep the CSRF token on same-origin API calls and lint colours in the build (#45)
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com> Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
This commit was merged in pull request #45.
This commit is contained in:
@@ -42,7 +42,8 @@ export function request(fetchMock: Mock<typeof fetch>, n: number) {
|
||||
}
|
||||
}
|
||||
|
||||
// fakeLocation stands in for window.location, recording navigations.
|
||||
// fakeLocation stands in for window.location on https://mealquest.test,
|
||||
// recording navigations.
|
||||
export function fakeLocation(pathname = '/', search = ''): ApiLocation & { assign: Mock<(url: string | URL) => void> } {
|
||||
return { pathname, search, assign: vi.fn<(url: string | URL) => void>() }
|
||||
return { origin: 'https://mealquest.test', pathname, search, assign: vi.fn<(url: string | URL) => void>() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user