Skip to content

Commit

Permalink
Improve quality of async timeout for afterAll spec
Browse files Browse the repository at this point in the history
We found that this test was always passing and had strange interactions
with the ordering of other specs. Rewriting it to explicitly finish the
afterAll after a specified interval makes it fail correctly.

[#73742528]
  • Loading branch information
tjarratt authored and Greg Cobb and Tim Jarratt committed Aug 28, 2014
1 parent 5b397ff commit 61bf9ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/core/integration/EnvSpec.js
Expand Up @@ -720,13 +720,15 @@ describe("Env integration", function() {
});

env.addReporter(reporter);
j$.DEFAULT_TIMEOUT_INTERVAL = 3000;

env.describe('my suite', function() {
env.it('my spec', function() {
});

env.afterAll(function(innerDone) {
jasmine.clock().tick(4312);
jasmine.clock().tick(3001);
innerDone();
});
});

Expand Down

0 comments on commit 61bf9ac

Please sign in to comment.