Keep the CSRF token on same-origin API calls and lint colours in the build (#45)
CI / ci (push) Successful in 1m33s
CI / ci (pull_request) Successful in 1m31s
Independent review Codex gpt-6-sol high: APPROVED (0 findings)

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:
2026-10-04 09:08:42 -04:00
committed by approver_agent
parent 048d5dd71a
commit 5758f198e4
4 changed files with 52 additions and 8 deletions
+3 -2
View File
@@ -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>() }
}