Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system: disallow describe.only and it.only #9693

Merged
merged 2 commits into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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