added availability
This commit is contained in:
10
test/setup.ts
Normal file
10
test/setup.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { config } from "dotenv";
|
||||
import path from "node:path";
|
||||
|
||||
config({ path: path.resolve(process.cwd(), ".env.test"), override: true });
|
||||
|
||||
if (!process.env.DATABASE_URL?.includes("touchbase_test")) {
|
||||
throw new Error(
|
||||
`Refusing to run tests against non-test database. DATABASE_URL=${process.env.DATABASE_URL}`,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user