mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: prohibit focused tests/suites on bots (#1686)
This commit is contained in:
parent
16dc037fc0
commit
508a78d99b
@ -3428,6 +3428,10 @@ if (process.env.COVERAGE) {
|
||||
});
|
||||
}
|
||||
|
||||
if (process.env.CI && runner.hasFocusedTestsOrSuites()) {
|
||||
console.error('ERROR: "focused" tests/suites are prohibitted on bots. Remove any "fit"/"fdescribe" declarations.');
|
||||
process.exit(1);
|
||||
}
|
||||
runner.run();
|
||||
/**
|
||||
* @param {!EventEmitter} emitter
|
||||
|
@ -360,6 +360,10 @@ class TestRunner extends EventEmitter {
|
||||
return tests;
|
||||
}
|
||||
|
||||
hasFocusedTestsOrSuites() {
|
||||
return this._hasFocusedTestsOrSuites;
|
||||
}
|
||||
|
||||
tests() {
|
||||
return this._tests.slice();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user