Refactor Study Desk application structure
This commit is contained in:
parent
faaccf8a7e
commit
089439ed90
145 changed files with 8087 additions and 3412 deletions
15
tests/setup/globalSetup.ts
Normal file
15
tests/setup/globalSetup.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue