Skip to content

Commit

Permalink
fix: await async assertions in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec-ant committed Dec 1, 2024
1 parent 9370494 commit 24b7118
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/blackbox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ for (const {
});

// Snapshot
expect(snapshotResult(barcode)).toMatchFileSnapshot(
await expect(snapshotResult(barcode)).toMatchFileSnapshot(
resolve(
import.meta.dirname,
`./__snapshots__/${directory}/${imageName}/${type}-${rotation}.json`,
Expand Down Expand Up @@ -233,7 +233,7 @@ for (const {
}
});
}
test.sequential(`${directory} summary`, () => {
test.sequential(`${directory} summary`, async () => {
for (const type of types) {
for (const _summary of Object.values(summary[type]!)) {
_summary!.failures = new Set([
Expand All @@ -254,7 +254,7 @@ for (const {
}
}
}
expect(`${JSON.stringify(summary, null, 2)}\n`).toMatchFileSnapshot(
await expect(`${JSON.stringify(summary, null, 2)}\n`).toMatchFileSnapshot(
resolve(
import.meta.dirname,
`./__snapshots__/${directory}/summary.json`,
Expand Down

0 comments on commit 24b7118

Please sign in to comment.