Skip to content

Commit 7aea012

Browse files
committed
test: fix globalThis.fetch type error in timeout-fix.test.ts
Newer Bun versions add 'preconnect' to typeof fetch, breaking direct assignment to globalThis.fetch. Cast through any to satisfy TypeScript. This is a pre-existing CI failure, not related to the subtitle fix.
1 parent 5e76aac commit 7aea012

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/auth/timeout-fix.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ describe('refreshAccessToken: timeout and error handling', () => {
124124
// We test the real function against a mock server via a wrapper
125125
// that overrides the fetch to hit our local server instead.
126126
const origFetch = globalThis.fetch;
127-
globalThis.fetch = async (input: RequestInfo | URL, init?: RequestInit) => {
127+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
128+
(globalThis as any).fetch = async (input: RequestInfo | URL, init?: RequestInit) => {
128129
const url = typeof input === 'string' ? input : input.toString();
129130
if (url.includes('oauth/token')) {
130131
return origFetch(`${server.url}/v1/oauth/token`, init);
@@ -156,7 +157,8 @@ describe('refreshAccessToken: timeout and error handling', () => {
156157

157158
const mod = await import('../../src/auth/refresh');
158159
const origFetch = globalThis.fetch;
159-
globalThis.fetch = async (input: RequestInfo | URL, init?: RequestInit) => {
160+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
161+
(globalThis as any).fetch = async (input: RequestInfo | URL, init?: RequestInit) => {
160162
const url = typeof input === 'string' ? input : input.toString();
161163
if (url.includes('oauth/token')) {
162164
return origFetch(`${server.url}/v1/oauth/token`, init);

0 commit comments

Comments
 (0)