Skip to content

Commit

Permalink
Bind describe.only() and describe.skip() in testMigration()
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-white committed Feb 16, 2024
1 parent 2e8f18b commit d050f0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/integration/other/migrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ const down = () => withTestDatabase((migrator) =>

const testMigration = (filename, tests, options = {}) => {
const { only = false, skip = false } = options;
const f = only ? describe.only : (skip ? describe.skip : describe);
const f = only
? describe.only.bind(describe)
: (skip ? describe.skip.bind(describe) : describe);
// eslint-disable-next-line func-names, space-before-function-paren
f(`database migrations: ${filename}`, function() {
this.timeout(20000);
Expand Down

0 comments on commit d050f0f

Please sign in to comment.