Adds new configuration option to failSpecWithNoExpectations that will report specs without expectations as failures if enabled

This commit is contained in:
Dmitriy T
2019-08-22 16:08:43 -04:00
committed by Steve Gravrock
parent e8870db8d3
commit 7263a38c3f
9 changed files with 172 additions and 48 deletions

View File

@@ -5,6 +5,7 @@ getJasmineRequireObj().TreeProcessor = function() {
queueRunnerFactory = attrs.queueRunnerFactory,
nodeStart = attrs.nodeStart || function() {},
nodeComplete = attrs.nodeComplete || function() {},
failSpecWithNoExpectations = !!attrs.failSpecWithNoExpectations,
orderChildren =
attrs.orderChildren ||
function(node) {
@@ -222,7 +223,11 @@ getJasmineRequireObj().TreeProcessor = function() {
} else {
return {
fn: function(done) {
node.execute(done, stats[node.id].excluded);
node.execute(
done,
stats[node.id].excluded,
failSpecWithNoExpectations
);
}
};
}