Reset the env state between parallel batches
This commit is contained in:
@@ -1641,6 +1641,11 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
reportSpecDone
|
||||
});
|
||||
|
||||
this.parallelReset = function() {
|
||||
// TODO: ensure that autoCleanClosures was false
|
||||
suiteBuilder.parallelReset();
|
||||
};
|
||||
|
||||
/**
|
||||
* Executes the specs.
|
||||
*
|
||||
@@ -8365,6 +8370,7 @@ getJasmineRequireObj().Runner = function(j$) {
|
||||
class Runner {
|
||||
constructor(options) {
|
||||
this.topSuite_ = options.topSuite;
|
||||
// TODO use names that read like getters
|
||||
this.totalSpecsDefined_ = options.totalSpecsDefined;
|
||||
this.focusedRunables_ = options.focusedRunables;
|
||||
this.runableResources_ = options.runableResources;
|
||||
@@ -9623,6 +9629,10 @@ getJasmineRequireObj().Suite = function(j$) {
|
||||
this.reportedDone = false;
|
||||
};
|
||||
|
||||
Suite.prototype.removeChildren = function() {
|
||||
this.children = [];
|
||||
};
|
||||
|
||||
Suite.prototype.addChild = function(child) {
|
||||
this.children.push(child);
|
||||
};
|
||||
@@ -9838,6 +9848,12 @@ getJasmineRequireObj().SuiteBuilder = function(j$) {
|
||||
this.focusedRunables = [];
|
||||
}
|
||||
|
||||
parallelReset() {
|
||||
this.topSuite.removeChildren();
|
||||
this.totalSpecsDefined = 0;
|
||||
this.focusedRunables = [];
|
||||
}
|
||||
|
||||
describe(description, definitionFn) {
|
||||
ensureIsFunction(definitionFn, 'describe');
|
||||
const suite = this.suiteFactory_(description);
|
||||
@@ -10424,5 +10440,5 @@ getJasmineRequireObj().UserContext = function(j$) {
|
||||
};
|
||||
|
||||
getJasmineRequireObj().version = function() {
|
||||
return '4.2.0';
|
||||
return '5.0.0-dev';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user