diff options
author | 2023-03-18 17:55:05 -0700 | |
---|---|---|
committer | 2023-03-18 17:55:05 -0700 | |
commit | e41e8847473a9daf9baf1d8c492f325686c03960 (patch) | |
tree | 3c654c5e861e54ac2345accecc0a151105979c76 | |
parent | 1b7423412ae7cf1b6303abe2ae8853070003518c (diff) | |
download | bun-e41e8847473a9daf9baf1d8c492f325686c03960.tar.gz bun-e41e8847473a9daf9baf1d8c492f325686c03960.tar.zst bun-e41e8847473a9daf9baf1d8c492f325686c03960.zip |
Hanging abort test
-rw-r--r-- | test/js/web/abort/abort.test.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/js/web/abort/abort.test.ts b/test/js/web/abort/abort.test.ts index c72f7cb5a..04b965b94 100644 --- a/test/js/web/abort/abort.test.ts +++ b/test/js/web/abort/abort.test.ts @@ -111,14 +111,16 @@ describe("AbortSignal", () => { expect(AbortSignal.abort()).toHaveProperty("reason"); expect(AbortSignal.timeout(0)).toHaveProperty("reason"); }); - test("onabort", () => { + test("onabort", done => { const signal = AbortSignal.timeout(0); expect(signal.onabort).toBeNull(); const onabort = (event: Event) => { expect(event instanceof Event).toBe(true); + done(); }; expect(() => (signal.onabort = onabort)).not.toThrow(); expect(signal.onabort).toStrictEqual(onabort); + setTimeout(() => {}, 1); }); }); }); |