Parallel: Disallow calls to Env#config from spec and helper files

Such configuration changes only affect one worker, which is almost certainly
not the intent.
This commit is contained in:
Steve Gravrock
2023-03-25 11:16:54 -07:00
parent 621522fdd4
commit 656427d328
3 changed files with 28 additions and 2 deletions

View File

@@ -174,6 +174,12 @@ getJasmineRequireObj().Env = function(j$) {
* @function
*/
this.configure = function(configuration) {
if (parallelLoadingState) {
throw new Error(
'Jasmine cannot be configured via Env in parallel mode'
);
}
const booleanProps = [
'random',
'failSpecWithNoExpectations',