fix: wrong usage of assertThrowsAsync which without await keyword (denoland/deno_std#295)

Original: 59adafe867
This commit is contained in:
Axetroy 2019-03-20 01:22:33 +08:00 committed by Ryan Dahl
parent 4ac66ec640
commit eaa795d477
5 changed files with 19 additions and 15 deletions

View file

@ -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.");
});