Skip to content

Commit

Permalink
Await all assertRejects
Browse files Browse the repository at this point in the history
  • Loading branch information
mllnd committed Nov 14, 2023
1 parent 40bb8f7 commit f7f926b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions keygen/deposit_data.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Deno.test("DepositData", async (t) => {
assertEquals(await verifyDepositData(keygenOptionsFixture.storagePath, fileName, depositData), true);
});

await t.step("Should throw an error when unable to save deposit data file", () => {
assertRejects(
await t.step("Should throw an error when unable to save deposit data file", async () => {
await assertRejects(
() => saveDepositData(credentialsFixture, "/invalid/path/to/storage"),
Error,
"Unable to save deposit data file",
Expand All @@ -29,7 +29,7 @@ Deno.test("DepositData", async (t) => {
const { depositData, fileName } = await saveDepositData(credentialsFixture, keygenOptionsFixture.storagePath);
await Deno.remove(`${resolve(keygenOptionsFixture.storagePath)}/${fileName}`);

assertRejects(
await assertRejects(
() => verifyDepositData(keygenOptionsFixture.storagePath, fileName, depositData),
Error,
"Unable to read deposit data file",
Expand Down
4 changes: 2 additions & 2 deletions keygen/keystore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Deno.test("Keystore", async (t) => {

const keystores = await createKeystores(credentialsFixture, keystorePassword);

assertRejects(
await assertRejects(
() => saveSigningKeystores(keystores, storagePath),
Error,
"Unable to save signing keystores",
Expand All @@ -47,7 +47,7 @@ Deno.test("Keystore", async (t) => {

await Deno.remove(`${storagePath}/${savedKeystores[0].fileName}`);

assertRejects(
await assertRejects(
() => verifySigningKeystores(storagePath, savedKeystores, keystorePassword),
Error,
`Unable to read signing keystore: ${savedKeystores[0].fileName}`,
Expand Down

0 comments on commit f7f926b

Please sign in to comment.