15 lines
371 B
TypeScript
15 lines
371 B
TypeScript
import {
|
|
applyCommittedMigrations,
|
|
createDisposableDatabase,
|
|
disposeDisposableDatabase,
|
|
} from "../helpers/testDatabase";
|
|
|
|
export default function globalSetup() {
|
|
const database = createDisposableDatabase();
|
|
process.env.DATABASE_URL = database.databaseUrl;
|
|
applyCommittedMigrations(database);
|
|
|
|
return () => {
|
|
disposeDisposableDatabase(database);
|
|
};
|
|
}
|