22 assertEquals ,
33 AssertionError ,
44 assertObjectMatch ,
5+ assertRejects ,
56 assertThrows ,
6- assertThrowsAsync ,
77 delay ,
88} from "./deps.ts" ;
99import { Spy , spy , Stub , stub } from "./test_deps.ts" ;
@@ -970,7 +970,7 @@ Deno.test("top level suite beforeAll/afterAll hooks leaking async ops", async ()
970970 assertEquals ( testSpys [ 0 ] . calls . length , 1 ) ;
971971 assertEquals ( testSpys [ 1 ] . calls . length , 0 ) ;
972972
973- await assertThrowsAsync (
973+ await assertRejects (
974974 async ( ) => await registerTestStub . calls [ 1 ] . args [ 0 ] . fn ( ) ,
975975 AssertionError ,
976976 "Test suite is leaking async ops." ,
@@ -1086,7 +1086,7 @@ Deno.test("top level suite beforeEach/afterEach hooks leaking async ops", async
10861086 assertEquals ( testSpys [ 0 ] . calls . length , 0 ) ;
10871087 assertEquals ( testSpys [ 1 ] . calls . length , 0 ) ;
10881088
1089- await assertThrowsAsync (
1089+ await assertRejects (
10901090 async ( ) => await registerTestStub . calls [ 0 ] . args [ 0 ] . fn ( ) ,
10911091 AssertionError ,
10921092 "Test case is leaking async ops." ,
@@ -1104,7 +1104,7 @@ Deno.test("top level suite beforeEach/afterEach hooks leaking async ops", async
11041104 // https://github.com/denoland/deno/issues/8965
11051105 if ( timer !== - 1 ) clearTimeout ( timer ) ;
11061106
1107- await assertThrowsAsync (
1107+ await assertRejects (
11081108 async ( ) => await registerTestStub . calls [ 1 ] . args [ 0 ] . fn ( ) ,
11091109 AssertionError ,
11101110 "Test case is leaking async ops." ,
@@ -1247,7 +1247,7 @@ Deno.test("top level suite tests leaking async ops", async () => {
12471247 assertEquals ( testSpys [ 0 ] . calls . length , 0 ) ;
12481248 assertEquals ( testSpys [ 1 ] . calls . length , 0 ) ;
12491249
1250- await assertThrowsAsync (
1250+ await assertRejects (
12511251 async ( ) => await registerTestStub . calls [ 0 ] . args [ 0 ] . fn ( ) ,
12521252 AssertionError ,
12531253 "Test case is leaking async ops." ,
@@ -1266,7 +1266,7 @@ Deno.test("top level suite tests leaking async ops", async () => {
12661266 // https://github.com/denoland/deno/issues/8965
12671267 if ( timer !== - 1 ) clearTimeout ( timer ) ;
12681268
1269- await assertThrowsAsync (
1269+ await assertRejects (
12701270 async ( ) => await registerTestStub . calls [ 1 ] . args [ 0 ] . fn ( ) ,
12711271 AssertionError ,
12721272 "Test case is leaking async ops." ,
@@ -1285,7 +1285,7 @@ Deno.test("top level suite tests leaking async ops", async () => {
12851285 // https://github.com/denoland/deno/issues/8965
12861286 if ( timer !== - 1 ) clearTimeout ( timer ) ;
12871287
1288- await assertThrowsAsync (
1288+ await assertRejects (
12891289 async ( ) => await registerTestStub . calls [ 2 ] . args [ 0 ] . fn ( ) ,
12901290 AssertionError ,
12911291 "Test case is leaking async ops." ,
@@ -1409,7 +1409,7 @@ Deno.test("top level suite beforeAll/afterAll hooks leaking resources", async ()
14091409 assertEquals ( testSpys [ 0 ] . calls . length , 1 ) ;
14101410 assertEquals ( testSpys [ 1 ] . calls . length , 0 ) ;
14111411
1412- await assertThrowsAsync (
1412+ await assertRejects (
14131413 async ( ) => await registerTestStub . calls [ 1 ] . args [ 0 ] . fn ( ) ,
14141414 AssertionError ,
14151415 "Test suite is leaking resources." ,
@@ -1520,7 +1520,7 @@ Deno.test("top level suite beforeEach/afterEach hooks leaking resources", async
15201520 assertEquals ( testSpys [ 0 ] . calls . length , 0 ) ;
15211521 assertEquals ( testSpys [ 1 ] . calls . length , 0 ) ;
15221522
1523- await assertThrowsAsync (
1523+ await assertRejects (
15241524 async ( ) => await registerTestStub . calls [ 0 ] . args [ 0 ] . fn ( ) ,
15251525 AssertionError ,
15261526 "Test case is leaking resources." ,
@@ -1532,7 +1532,7 @@ Deno.test("top level suite beforeEach/afterEach hooks leaking resources", async
15321532 assertEquals ( testSpys [ 0 ] . calls . length , 1 ) ;
15331533 assertEquals ( testSpys [ 1 ] . calls . length , 0 ) ;
15341534
1535- await assertThrowsAsync (
1535+ await assertRejects (
15361536 async ( ) => await registerTestStub . calls [ 1 ] . args [ 0 ] . fn ( ) ,
15371537 AssertionError ,
15381538 "Test case is leaking resources." ,
@@ -1663,7 +1663,7 @@ Deno.test("top level suite tests leaking resources", async () => {
16631663 assertEquals ( testSpys [ 0 ] . calls . length , 0 ) ;
16641664 assertEquals ( testSpys [ 1 ] . calls . length , 0 ) ;
16651665
1666- await assertThrowsAsync (
1666+ await assertRejects (
16671667 async ( ) => await registerTestStub . calls [ 0 ] . args [ 0 ] . fn ( ) ,
16681668 AssertionError ,
16691669 "Test case is leaking resources." ,
@@ -1676,7 +1676,7 @@ Deno.test("top level suite tests leaking resources", async () => {
16761676 assertEquals ( testSpys [ 1 ] . calls . length , 0 ) ;
16771677 assertEquals ( testSpys [ 2 ] . calls . length , 0 ) ;
16781678
1679- await assertThrowsAsync (
1679+ await assertRejects (
16801680 async ( ) => await registerTestStub . calls [ 1 ] . args [ 0 ] . fn ( ) ,
16811681 AssertionError ,
16821682 "Test case is leaking resources." ,
@@ -1689,7 +1689,7 @@ Deno.test("top level suite tests leaking resources", async () => {
16891689 assertEquals ( testSpys [ 1 ] . calls . length , 1 ) ;
16901690 assertEquals ( testSpys [ 2 ] . calls . length , 0 ) ;
16911691
1692- await assertThrowsAsync (
1692+ await assertRejects (
16931693 async ( ) => await registerTestStub . calls [ 2 ] . args [ 0 ] . fn ( ) ,
16941694 AssertionError ,
16951695 "Test case is leaking resources." ,
0 commit comments