Skip to content

Commit

Permalink
Disable describe.only and it.only (#9693)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi authored Mar 22, 2023
1 parent 85744b1 commit 7585fed
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 7585fed

Please sign in to comment.