Skip to content

Commit c7ed076

Browse files
committed
Await cancellation regression assertion directly
1 parent 117160f commit c7ed076

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/api/src/code/instructions.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ describe('repository instruction loading', () => {
6161
).toBeUndefined();
6262
const controller = new AbortController();
6363
const cancelled = load({ ...args, signal: controller.signal });
64-
const assertion = expect(cancelled).rejects.toThrow('cancelled');
6564
controller.abort(new Error('cancelled'));
66-
await assertion;
65+
await expect(cancelled).rejects.toThrow('cancelled');
6766
} finally {
6867
jest.useRealTimers();
6968
}

0 commit comments

Comments
 (0)