This commit is contained in:
2026-08-27 10:44:59 +08:00
parent df4b7eba8e
commit 458c8d5961
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -88,7 +88,8 @@ test('uses real auth endpoints and single-flight refresh handling', () => {
assert.match(httpSource, /envelope\.code !== '200'/)
assert.match(httpSource, /redirectToLoginAfterSessionExpiry/)
assert.match(httpSource, /error instanceof CrossTabRefreshTimeoutError/)
assert.match(httpSource, /new ApiError\(error\.message, 'A0401', 401\)/)
assert.match(httpSource, /const expiredError = new ApiError\(error\.message, 'A0401', 401\)/)
assert.match(httpSource, /error instanceof CrossTabRefreshTimeoutError[\s\S]*window\.dispatchEvent\(new CustomEvent\('cc-client-session-expired'\)\)[\s\S]*redirectToLoginAfterSessionExpiry\(\)/)
assert.match(httpSource, /window\.location\.replace\(`\/login\?redirect=\$\{encodeURIComponent\(redirect\)\}`\)/)
assert.match(authStoreSource, /decodeMerchantToken/)
assert.doesNotMatch(authStoreSource, /mock-client:/)