test: create test runner to do initial setup for DB
This commit is contained in:
13
testRunner.ts
Normal file
13
testRunner.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { $ } from "zx";
|
||||
|
||||
const tursoProcess = $`turso dev --port 3000`.nothrow();
|
||||
|
||||
process.env.TURSO_URL = "http://127.0.0.1:3000";
|
||||
process.env.TURSO_AUTH_TOKEN = "asd";
|
||||
await $`bun db:migrate`.nothrow();
|
||||
await $({
|
||||
verbose: true,
|
||||
quote: (arg) => arg,
|
||||
})`FORCE_COLOR=1 bun test ${process.argv.slice(2).join(" ")}`.nothrow();
|
||||
|
||||
await tursoProcess.kill("SIGINT");
|
||||
Reference in New Issue
Block a user