fix: test runner not exiting with code 1 when test fails
This commit is contained in:
@@ -23,6 +23,7 @@ const positionalArgs = Object.entries(args)
|
||||
console.log(formatCmd(args["dbCommand"]));
|
||||
const dbProcess = $({ quote: (arg) => arg })`${args["dbCommand"]}`.nothrow();
|
||||
|
||||
try {
|
||||
$.env = {
|
||||
...getTestEnvVariables(),
|
||||
PATH: process.env["PATH"],
|
||||
@@ -33,6 +34,7 @@ await $`bun db:migrate`.nothrow();
|
||||
await $({
|
||||
verbose: true,
|
||||
quote: (arg) => arg,
|
||||
})`FORCE_COLOR=1 bun test ${positionalArgs.join(" ")}`.nothrow();
|
||||
|
||||
})`FORCE_COLOR=1 bun test ${positionalArgs.join(" ")}`;
|
||||
} finally {
|
||||
await dbProcess.kill("SIGINT");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user