Skip to content

Commit

Permalink
test(dotenv): await assertRejects (#3651)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k authored Sep 19, 2023
1 parent c0dd93f commit 9479524
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dotenv/mod_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,19 +722,19 @@ Deno.test(
assertStrictEquals(Object.keys(await load(optsNoPaths)).length, 0);
assertEnv(await load(optsOnlyEnvPath));

assertRejects(
await assertRejects(
() => load(optsEnvPath),
Deno.errors.PermissionDenied,
`Requires read access to ".env.defaults"`,
);

assertRejects(
await assertRejects(
() => load({ ...optsEnvPath, defaultsPath: null }),
Deno.errors.PermissionDenied,
`Requires read access to ".env.example"`,
);

assertRejects(
await assertRejects(
() => load({ ...optsEnvPath, examplePath: null }),
Deno.errors.PermissionDenied,
`Requires read access to ".env.defaults"`,
Expand Down

0 comments on commit 9479524

Please sign in to comment.