Separated reporter- and runable-specific queue runner configuration
This commit is contained in:
+19
-17
@@ -1458,21 +1458,6 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function queueRunnerFactory(options) {
|
function queueRunnerFactory(options) {
|
||||||
if (options.isLeaf) {
|
|
||||||
// A spec
|
|
||||||
options.SkipPolicy = j$.CompleteOnFirstErrorSkipPolicy;
|
|
||||||
} else if (options.isReporter) {
|
|
||||||
// A reporter queue
|
|
||||||
options.SkipPolicy = j$.NeverSkipPolicy;
|
|
||||||
} else {
|
|
||||||
// A suite
|
|
||||||
if (config.stopOnSpecFailure) {
|
|
||||||
options.SkipPolicy = j$.CompleteOnFirstErrorSkipPolicy;
|
|
||||||
} else {
|
|
||||||
options.SkipPolicy = j$.SkipAfterBeforeAllErrorPolicy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
options.clearStack = options.clearStack || clearStack;
|
options.clearStack = options.clearStack || clearStack;
|
||||||
options.timeout = {
|
options.timeout = {
|
||||||
setTimeout: realSetTimeout,
|
setTimeout: realSetTimeout,
|
||||||
@@ -1586,7 +1571,10 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
*/
|
*/
|
||||||
'specDone'
|
'specDone'
|
||||||
],
|
],
|
||||||
queueRunnerFactory,
|
function(options) {
|
||||||
|
options.SkipPolicy = j$.NeverSkipPolicy;
|
||||||
|
return queueRunnerFactory(options);
|
||||||
|
},
|
||||||
recordLateError
|
recordLateError
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -8306,7 +8294,21 @@ getJasmineRequireObj().Runner = function(j$) {
|
|||||||
const processor = new j$.TreeProcessor({
|
const processor = new j$.TreeProcessor({
|
||||||
tree: this.topSuite_,
|
tree: this.topSuite_,
|
||||||
runnableIds: runablesToRun,
|
runnableIds: runablesToRun,
|
||||||
queueRunnerFactory: this.queueRunnerFactory_,
|
queueRunnerFactory: options => {
|
||||||
|
if (options.isLeaf) {
|
||||||
|
// A spec
|
||||||
|
options.SkipPolicy = j$.CompleteOnFirstErrorSkipPolicy;
|
||||||
|
} else {
|
||||||
|
// A suite
|
||||||
|
if (config.stopOnSpecFailure) {
|
||||||
|
options.SkipPolicy = j$.CompleteOnFirstErrorSkipPolicy;
|
||||||
|
} else {
|
||||||
|
options.SkipPolicy = j$.SkipAfterBeforeAllErrorPolicy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.queueRunnerFactory_(options);
|
||||||
|
},
|
||||||
failSpecWithNoExpectations: config.failSpecWithNoExpectations,
|
failSpecWithNoExpectations: config.failSpecWithNoExpectations,
|
||||||
nodeStart: (suite, next) => {
|
nodeStart: (suite, next) => {
|
||||||
this.currentlyExecutingSuites_.push(suite);
|
this.currentlyExecutingSuites_.push(suite);
|
||||||
|
|||||||
+4
-16
@@ -365,21 +365,6 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function queueRunnerFactory(options) {
|
function queueRunnerFactory(options) {
|
||||||
if (options.isLeaf) {
|
|
||||||
// A spec
|
|
||||||
options.SkipPolicy = j$.CompleteOnFirstErrorSkipPolicy;
|
|
||||||
} else if (options.isReporter) {
|
|
||||||
// A reporter queue
|
|
||||||
options.SkipPolicy = j$.NeverSkipPolicy;
|
|
||||||
} else {
|
|
||||||
// A suite
|
|
||||||
if (config.stopOnSpecFailure) {
|
|
||||||
options.SkipPolicy = j$.CompleteOnFirstErrorSkipPolicy;
|
|
||||||
} else {
|
|
||||||
options.SkipPolicy = j$.SkipAfterBeforeAllErrorPolicy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
options.clearStack = options.clearStack || clearStack;
|
options.clearStack = options.clearStack || clearStack;
|
||||||
options.timeout = {
|
options.timeout = {
|
||||||
setTimeout: realSetTimeout,
|
setTimeout: realSetTimeout,
|
||||||
@@ -493,7 +478,10 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
*/
|
*/
|
||||||
'specDone'
|
'specDone'
|
||||||
],
|
],
|
||||||
queueRunnerFactory,
|
function(options) {
|
||||||
|
options.SkipPolicy = j$.NeverSkipPolicy;
|
||||||
|
return queueRunnerFactory(options);
|
||||||
|
},
|
||||||
recordLateError
|
recordLateError
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+15
-1
@@ -57,7 +57,21 @@ getJasmineRequireObj().Runner = function(j$) {
|
|||||||
const processor = new j$.TreeProcessor({
|
const processor = new j$.TreeProcessor({
|
||||||
tree: this.topSuite_,
|
tree: this.topSuite_,
|
||||||
runnableIds: runablesToRun,
|
runnableIds: runablesToRun,
|
||||||
queueRunnerFactory: this.queueRunnerFactory_,
|
queueRunnerFactory: options => {
|
||||||
|
if (options.isLeaf) {
|
||||||
|
// A spec
|
||||||
|
options.SkipPolicy = j$.CompleteOnFirstErrorSkipPolicy;
|
||||||
|
} else {
|
||||||
|
// A suite
|
||||||
|
if (config.stopOnSpecFailure) {
|
||||||
|
options.SkipPolicy = j$.CompleteOnFirstErrorSkipPolicy;
|
||||||
|
} else {
|
||||||
|
options.SkipPolicy = j$.SkipAfterBeforeAllErrorPolicy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.queueRunnerFactory_(options);
|
||||||
|
},
|
||||||
failSpecWithNoExpectations: config.failSpecWithNoExpectations,
|
failSpecWithNoExpectations: config.failSpecWithNoExpectations,
|
||||||
nodeStart: (suite, next) => {
|
nodeStart: (suite, next) => {
|
||||||
this.currentlyExecutingSuites_.push(suite);
|
this.currentlyExecutingSuites_.push(suite);
|
||||||
|
|||||||
Reference in New Issue
Block a user