Skip to content

Commit 3701edd

Browse files
committed
fix: timeoutSignal is lost after being overriden with controller.signal
1 parent 3cf72af commit 3701edd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/watch_test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,8 @@ describe('Watch', () => {
459459
const watch = new Watch(kc);
460460

461461
// NOTE: Hack around the type system to make the timeout shorter
462-
(watch as any).requestTimeoutMs = 100;
462+
(watch as any).requestTimeoutMs = 1;
463463

464-
let doneCalled = false;
465464
let doneErr: any;
466465

467466
let doneResolve: () => void;
@@ -476,15 +475,13 @@ describe('Watch', () => {
476475
throw new Error('Unexpected data received - timeout should have occurred before any data');
477476
},
478477
(err: any) => {
479-
doneCalled = true;
480478
doneErr = err;
481479
doneResolve();
482480
},
483481
);
484482

485483
await donePromise;
486484

487-
strictEqual(doneCalled, true);
488485
strictEqual(doneErr.name, 'AbortError');
489486
});
490487

0 commit comments

Comments
 (0)