Skip to content

Commit

Permalink
test: ✅ Fix dangling promise error in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pklaschka committed Oct 29, 2024
1 parent 87010e9 commit 6af115d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mod_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ Deno.test("initVariable", async (t) => {
);

prepare("value");
assertRejects(
await assertRejects(
() => initVariable(ENV_VAR, REQUIRED_FAILING),
ConfigParseError,
undefined,
"Expected a ConfigParseError when the value cannot be parsed",
);
assertRejects(
await assertRejects(
() => initVariable(ENV_VAR, OPTIONAL_FAILING),
ConfigParseError,
undefined,
Expand Down Expand Up @@ -168,15 +168,15 @@ Deno.test("initVariable", async (t) => {
);

prepare(undefined, EXISTING_FILE);
assertRejects(
await assertRejects(
() => initVariable(ENV_VAR, REQUIRED_FAILING),
ConfigParseError,
undefined,
`Expected a ConfigParseError when the value cannot be parsed`,
);

prepare(undefined, NONEXISTING_FILE);
assertRejects(
await assertRejects(
() => initVariable(ENV_VAR, REQUIRED_PASSING),
ConfigFileReadError,
undefined,
Expand Down Expand Up @@ -212,7 +212,7 @@ Deno.test("initVariable", async (t) => {
);

prepare();
assertRejects(
await assertRejects(
() => initVariable(ENV_VAR, REQUIRED_FAILING, DEFAULT_VALUE),
ConfigParseError,
undefined,
Expand Down

0 comments on commit 6af115d

Please sign in to comment.