test: match the forced token refresh URL in the logout tests - #860
Open
dealerweb wants to merge 1 commit into
Open
test: match the forced token refresh URL in the logout tests#860dealerweb wants to merge 1 commit into
dealerweb wants to merge 1 commit into
Conversation
The shorter auth waterfall makes refreshAccessToken skip the server-side token cache by default, appending force=true to the PUT. The logout redirect tests still mocked the bare slot URL, so every refresh hit the mock's unexpected-call guard and three tests failed. Match the PUT on the forced URL; the DELETE paths are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
refreshAccessTokennow skips the server-side token cache by default and appendsforce=trueto its PUT (part of the shorter auth waterfall). The logout redirect tests still mock the bare slot URL, so every refresh hits the mock's unexpected-call guard — three tests fail onmain. This brings the mocks in line with the new URL.Changes
/api/auth/token?slot=0&force=truein the fetch mocks and call-count filters ofstores/__tests__/auth-store-logout.test.ts; the DELETE paths are unchanged.Related issues
None — test-only follow-up to the auth waterfall change.
Type of change
Checklist
npm run typecheck && npm run lintand there are no errorsnpm run build)locales/) if my changes affect user-facing textScreenshots / demo
No UI involved — test-only change.
Notes for reviewers
main:npx vitest run stores/__tests__/auth-store-logout.test.tsfails 3 of 6 with "Unexpected fetch call: PUT /api/auth/token?slot=0&force=true"; 6/6 green with this change.force=truedefault itself looks intentional (documented inline inrefreshAccessToken); this PR only aligns the tests.