Skip to content

Commit

Permalink
Disable describe.only and it.only (prebid#9693)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi authored and jorgeluisrocha committed May 18, 2023
1 parent b80f6fc commit 4629dc7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@

[it, describe].forEach((ob) => {
ob.only = function () {
[
'describe.only and it.only are disabled unless you provide a single spec --file,',
'because they can silently break the pipeline tests',
// eslint-disable-next-line no-console
].forEach(l => console.error(l))
throw new Error('do not use .only()')
}
})

require('./test_deps.js');

var testsContext = require.context('.', true, /_spec$/);
Expand Down

0 comments on commit 4629dc7

Please sign in to comment.