Parallel: forbid beforeEach/afterEach at the top level of spec files
Each spec file is only loaded in a single worker, so top level before/afterEach can't behave consistently. beforeEach/afterEach are still supported in: * Helper files * describe() blocks * At the top level of spec files in non-parallel mode
This commit is contained in:
@@ -22,6 +22,10 @@ getJasmineRequireObj().SuiteBuilder = function(j$) {
|
||||
this.focusedRunables = [];
|
||||
}
|
||||
|
||||
inDescribe() {
|
||||
return this.currentDeclarationSuite_ !== this.topSuite;
|
||||
}
|
||||
|
||||
parallelReset() {
|
||||
this.topSuite.removeChildren();
|
||||
this.topSuite.reset();
|
||||
|
||||
Reference in New Issue
Block a user