Merge branch 'main' into parallel
This commit is contained in:
@@ -51,7 +51,7 @@ getJasmineRequireObj().Runner = function(j$) {
|
||||
|
||||
const order = new j$.Order({
|
||||
random: config.random,
|
||||
seed: config.seed
|
||||
seed: j$.isNumber_(config.seed) ? config.seed + '' : config.seed
|
||||
});
|
||||
|
||||
const processor = new j$.TreeProcessor({
|
||||
|
||||
@@ -38,11 +38,6 @@ getJasmineRequireObj().SuiteBuilder = function(j$) {
|
||||
suite.exclude();
|
||||
}
|
||||
this.addSpecsToSuite_(suite, definitionFn);
|
||||
if (suite.parentSuite && !suite.children.length) {
|
||||
throw new Error(
|
||||
`describe with no children (describe() or it()): ${suite.getFullName()}`
|
||||
);
|
||||
}
|
||||
return suite;
|
||||
}
|
||||
|
||||
@@ -189,11 +184,19 @@ getJasmineRequireObj().SuiteBuilder = function(j$) {
|
||||
const parentSuite = this.currentDeclarationSuite_;
|
||||
parentSuite.addChild(suite);
|
||||
this.currentDeclarationSuite_ = suite;
|
||||
let threw = false;
|
||||
|
||||
try {
|
||||
definitionFn();
|
||||
} catch (e) {
|
||||
suite.handleException(e);
|
||||
threw = true;
|
||||
}
|
||||
|
||||
if (suite.parentSuite && !suite.children.length && !threw) {
|
||||
throw new Error(
|
||||
`describe with no children (describe() or it()): ${suite.getFullName()}`
|
||||
);
|
||||
}
|
||||
|
||||
this.currentDeclarationSuite_ = parentSuite;
|
||||
|
||||
Reference in New Issue
Block a user