assertThrowsAsync

does assertThrowsAsync still exist? I see it here: https://medium.com/deno-the-complete-reference/testing-with-deno-part-4-asserts-5b708c0e33e4 but not in the documentation or the source. Is this the way I should with with the normal assertThrows
Deno.test("test DB function",
async function () {
await assertThrows(async () => {
await db_call()
});
},
);
Deno.test("test DB function",
async function () {
await assertThrows(async () => {
await db_call()
});
},
);
Medium
Testing with Deno — Part 4 Asserts
Learn all about asserts in Deno
2 Replies
KyleJune
KyleJune2y ago
It was renamed to assertRejects Just replace assertThrows with assertRejects in your example and that is how it works. https://deno.land/std@0.160.0/testing/asserts.ts?s=assertRejects
dan.the.discloser
❣️