Skip to content

Commit

Permalink
fix migrator.spec
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed Feb 3, 2025
1 parent ae3052f commit 5eff286
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/api/migrations/specs/migrator.spec.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
import { toHaveBeenCalledBefore } from 'jest-extended';
import path from 'path';

import { testingEnvironment } from 'api/utils/testingEnvironment';

import testingDB from '../../utils/testing_db';
import migrationsModel from '../migrationsModel';
import { migrator } from '../migrator';
import migration1 from './testMigrations/1-migrationTest';
import migration10 from './testMigrations/10-migrationTest';
import migration2 from './testMigrations/2-migrationTest';
import migrationsModel from '../migrationsModel';
import { migrator } from '../migrator';
import testingDB from '../../utils/testing_db';

expect.extend({ toHaveBeenCalledBefore });

describe('migrator', () => {
let connection;
beforeAll(async () => {
connection = await testingDB.connect();
await testingEnvironment.setUp({});
connection = testingDB.mongodb;
});

afterAll(async () => {
await testingDB.disconnect();
await testingEnvironment.tearDown();
});

it('should have migrations directory configured', () => {
Expand Down

0 comments on commit 5eff286

Please sign in to comment.