mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 21:24:48 +00:00
fix: wrong usage of assertThrowsAsync which without await keyword (denoland/deno_std#295)
Original: 59adafe867
This commit is contained in:
parent
4ac66ec640
commit
eaa795d477
5 changed files with 19 additions and 15 deletions
|
@ -12,7 +12,7 @@ test(async function ensureDirIfItNotExist() {
|
|||
|
||||
await ensureDir(testDir);
|
||||
|
||||
assertThrowsAsync(async () => {
|
||||
await assertThrowsAsync(async () => {
|
||||
await Deno.stat(testDir).then(() => {
|
||||
throw new Error("test dir should exists.");
|
||||
});
|
||||
|
@ -44,7 +44,7 @@ test(async function ensureDirIfItExist() {
|
|||
|
||||
await ensureDir(testDir);
|
||||
|
||||
assertThrowsAsync(async () => {
|
||||
await assertThrowsAsync(async () => {
|
||||
await Deno.stat(testDir).then(() => {
|
||||
throw new Error("test dir should still exists.");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue