Move spec begin and end handling from Env/SuiteBuilder to TreeRunner
This commit is contained in:
@@ -477,8 +477,6 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
expectationFactory,
|
||||
asyncExpectationFactory,
|
||||
onLateError: recordLateError,
|
||||
specResultCallback,
|
||||
specStarted,
|
||||
runQueue
|
||||
});
|
||||
topSuite = suiteBuilder.topSuite;
|
||||
@@ -520,8 +518,7 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
runQueue,
|
||||
TreeProcessor: j$.TreeProcessor,
|
||||
globalErrors,
|
||||
getConfig: () => config,
|
||||
reportSpecDone
|
||||
getConfig: () => config
|
||||
});
|
||||
|
||||
this.setParallelLoadingState = function(state) {
|
||||
@@ -763,28 +760,6 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
.metadata;
|
||||
};
|
||||
|
||||
function specResultCallback(spec, result, next) {
|
||||
runableResources.clearForRunable(spec.id);
|
||||
runner.setCurrentSpec(null);
|
||||
|
||||
if (result.status === 'failed') {
|
||||
runner.hasFailures = true;
|
||||
}
|
||||
|
||||
reportSpecDone(spec, result, next);
|
||||
}
|
||||
|
||||
function specStarted(spec, suite, next) {
|
||||
runner.setCurrentSpec(spec);
|
||||
runableResources.initForRunable(spec.id, suite.id);
|
||||
reportDispatcher.specStarted(spec.result).then(next);
|
||||
}
|
||||
|
||||
function reportSpecDone(spec, result, next) {
|
||||
spec.reportedDone = true;
|
||||
reportDispatcher.specDone(result).then(next);
|
||||
}
|
||||
|
||||
this.it = function(description, fn, timeout) {
|
||||
ensureIsNotNested('it');
|
||||
const filename = callerCallerFilename();
|
||||
|
||||
Reference in New Issue
Block a user