Skip to content

Commit

Permalink
test - do the input assertion after any setup steps
Browse files Browse the repository at this point in the history
Because some step may create the input in the context.setup part
  • Loading branch information
cderv committed Jun 13, 2024
1 parent cec214c commit 50b4cf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/smoke/render/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ export function testRender(
{
...context,
setup: async () => {
assert(safeExistsSync(input), `Input file ${input} does not exist. Test could not be ran.`);
if (context?.setup) {
await context?.setup();
}
assert(safeExistsSync(input), `Input file ${input} does not exist. Test could not be ran.`);
},
teardown: async () => {
if (context?.teardown) {
Expand Down

0 comments on commit 50b4cf1

Please sign in to comment.