Check for and silence suite reentry warnings in Jasmine's own tests
This commit is contained in:
@@ -787,6 +787,7 @@ describe('TreeProcessor', function() {
|
|||||||
runQueue
|
runQueue
|
||||||
});
|
});
|
||||||
|
|
||||||
|
spyOn(jasmineUnderTest.getEnv(), 'deprecated');
|
||||||
processor.execute();
|
processor.execute();
|
||||||
const queueableFns = runQueue.calls.mostRecent().args[0].queueableFns;
|
const queueableFns = runQueue.calls.mostRecent().args[0].queueableFns;
|
||||||
expect(queueableFns.length).toBe(5);
|
expect(queueableFns.length).toBe(5);
|
||||||
@@ -831,6 +832,7 @@ describe('TreeProcessor', function() {
|
|||||||
runQueue
|
runQueue
|
||||||
});
|
});
|
||||||
|
|
||||||
|
spyOn(jasmineUnderTest.getEnv(), 'deprecated');
|
||||||
processor.execute();
|
processor.execute();
|
||||||
const queueableFns = runQueue.calls.mostRecent().args[0].queueableFns;
|
const queueableFns = runQueue.calls.mostRecent().args[0].queueableFns;
|
||||||
expect(queueableFns.length).toBe(5);
|
expect(queueableFns.length).toBe(5);
|
||||||
|
|||||||
@@ -621,9 +621,14 @@ describe('spec running', function() {
|
|||||||
actions.push('spec3');
|
actions.push('spec3');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
spyOn(jasmineUnderTest.getEnv(), 'deprecated');
|
||||||
|
|
||||||
await env.execute([spec2.id, spec3.id, spec1.id]);
|
await env.execute([spec2.id, spec3.id, spec1.id]);
|
||||||
|
|
||||||
expect(actions).toEqual(['spec2', 'spec3', 'spec1']);
|
expect(actions).toEqual(['spec2', 'spec3', 'spec1']);
|
||||||
|
expect(jasmineUnderTest.getEnv().deprecated).toHaveBeenCalledWith(
|
||||||
|
'The specified spec/suite order splits up a suite, running unrelated specs in the middle of it. This will become an error in a future release.'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('refuses to re-enter suites with a beforeAll', async function() {
|
it('refuses to re-enter suites with a beforeAll', async function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user