fix: avoid Claude token refresh races across services
This commit is contained in:
13
src/token-refresh.test.ts
Normal file
13
src/token-refresh.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { shouldStartTokenRefreshLoop } from './token-refresh.js';
|
||||
|
||||
describe('shouldStartTokenRefreshLoop', () => {
|
||||
it('starts refresh for the Claude service', () => {
|
||||
expect(shouldStartTokenRefreshLoop('claude-code')).toBe(true);
|
||||
});
|
||||
|
||||
it('skips refresh for the Codex service', () => {
|
||||
expect(shouldStartTokenRefreshLoop('codex')).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user