Parallel: fail if randomization is disabled or a seed is specified
This commit is contained in:
@@ -532,6 +532,11 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
*/
|
||||
this.execute = async function(runablesToRun) {
|
||||
installGlobalErrors();
|
||||
|
||||
if (parallelLoadingState) {
|
||||
validateConfigForParallel();
|
||||
}
|
||||
|
||||
return runner.execute(runablesToRun);
|
||||
};
|
||||
|
||||
@@ -689,6 +694,16 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
}
|
||||
}
|
||||
|
||||
function validateConfigForParallel() {
|
||||
if (!config.random) {
|
||||
throw new Error('Randomization cannot be disabled in parallel mode');
|
||||
}
|
||||
|
||||
if (config.seed !== null && config.seed !== undefined) {
|
||||
throw new Error('Random seed cannot be set in parallel mode');
|
||||
}
|
||||
}
|
||||
|
||||
this.describe = function(description, definitionFn) {
|
||||
ensureIsNotNested('describe');
|
||||
return suiteBuilder.describe(description, definitionFn).metadata;
|
||||
|
||||
Reference in New Issue
Block a user