Skip to content

Commit

Permalink
test: silent migration test (#5131)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Oct 23, 2023
1 parent 8bc04c5 commit ab390db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/e2e/migrator.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { getDbConfig } from './helpers/database-config';
import { createTestConfig } from '../config/test-config';
import { getInstance } from 'db-migrate';
import { log } from 'db-migrate-shared';
import { Client } from 'pg';
import { IDBOption } from 'lib/types';

log.setLogLevel('error');

async function initSchema(db: IDBOption): Promise<void> {
const client = new Client(db);
await client.connect();
Expand All @@ -30,6 +33,8 @@ test('Up & down migrations work', async () => {
connectionTimeoutMillis: 2000,
};

// disable Intellij/WebStorm from setting verbose CLI argument to db-migrator
process.argv = process.argv.filter((it) => !it.includes('--verbose'));
const dbm = getInstance(true, {
cwd: `${__dirname}/../../`, // relative to src/test/e2e
config: { e2e },
Expand Down

0 comments on commit ab390db

Please sign in to comment.