mirror of
https://github.com/seerr-team/seerr.git
synced 2026-04-17 22:07:59 -04:00
19 lines
487 B
TypeScript
19 lines
487 B
TypeScript
import { seedTestDb } from '@server/utils/seedTestDb';
|
|
import { copyFileSync } from 'fs';
|
|
import path from 'path';
|
|
|
|
const prepareDb = async () => {
|
|
// Copy over test settings.json
|
|
copyFileSync(
|
|
path.join(__dirname, '../../cypress/config/settings.cypress.json'),
|
|
path.join(__dirname, '../../config/settings.json')
|
|
);
|
|
|
|
await seedTestDb({
|
|
preserveDb: process.env.PRESERVE_DB === 'true',
|
|
withMigrations: process.env.WITH_MIGRATIONS === 'true',
|
|
});
|
|
};
|
|
|
|
prepareDb();
|