Skip to content

Commit

Permalink
test: fix the "Module not found" errors in the migration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joelmukuthu committed Sep 15, 2023
1 parent 4ca0618 commit a90ad28
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/unexpected-knex.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ const unexpectedKnex = require('../lib/unexpected-knex');
const dontIndent = require('dedent-js');
const assertErrorOuput = process.env.ASSERT_ERROR_OUTPUT !== 'false';

// This file is `require`d here so that it's cached by Node.js before we go
// ahead and mock out `require`, since knex's migrator require's it while doing
// its job.
require('knex/lib/util/import-file.js');

describe('unexpected-knex', function () {
const host = process.env.PGHOST || 'localhost';
const knex = Knex({
Expand Down

0 comments on commit a90ad28

Please sign in to comment.