Parallel: fail if randomization is disabled or a seed is specified

This commit is contained in:
Steve Gravrock
2022-10-12 20:08:42 -07:00
parent bb497beeff
commit 47c64a86d5
3 changed files with 48 additions and 0 deletions

View File

@@ -752,6 +752,24 @@ describe('Env', function() {
await env.execute();
expect(jasmineUnderTest.Suite.prototype.reset).not.toHaveBeenCalled();
});
describe('In parallel mode', function() {
it('rejects if random is set to false', async function() {
env.setParallelLoadingState('specs');
env.configure({ random: false });
await expectAsync(env.execute()).toBeRejectedWithError(
'Randomization cannot be disabled in parallel mode'
);
});
it('rejects if seed is set', async function() {
env.setParallelLoadingState('specs');
env.configure({ seed: 1234 });
await expectAsync(env.execute()).toBeRejectedWithError(
'Random seed cannot be set in parallel mode'
);
});
});
});
describe('#spyOnGlobalErrorsAsync', function() {