Skip to content

Commit 199565e

Browse files
committed
🌿 fix interrupt() test
1 parent ad5c642 commit 199565e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

denops/@denops-private/service_test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
assertRejects,
1111
assertStrictEquals,
1212
assertStringIncludes,
13-
assertThrows,
1413
} from "jsr:@std/assert@^1.0.1";
1514
import {
1615
assertSpyCall,
@@ -1242,7 +1241,7 @@ Deno.test("Service", async (t) => {
12421241

12431242
service.interrupt();
12441243

1245-
assertThrows(() => signal.throwIfAborted());
1244+
assert(signal.aborted);
12461245
});
12471246

12481247
await t.step("sends signal to `interrupted` attribute with reason", () => {
@@ -1251,7 +1250,8 @@ Deno.test("Service", async (t) => {
12511250

12521251
service.interrupt("test");
12531252

1254-
assertThrows(() => signal.throwIfAborted(), "test");
1253+
assert(signal.aborted);
1254+
assertEquals(signal.reason, "test");
12551255
});
12561256
});
12571257

0 commit comments

Comments
 (0)