Skip to content

Commit

Permalink
avoid test flake in "delay" test; closes #2469
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Sep 14, 2016
1 parent 95e524c commit 058d00c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions test/integration/fixtures/options/delay.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
var assert = require('assert');
var delay = 500;
var start = new Date().getTime();

setTimeout(function() {
describe('delayed execution', function() {
it('should have waited ' + delay + 'ms to run this suite', function() {
assert(new Date().getTime() - delay >= start);
});

it('should have no effect if attempted twice in the same suite', function() {
assert(true);
run();
Expand Down
4 changes: 2 additions & 2 deletions test/integration/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ describe('options', function() {
run('options/delay.js', args, function(err, res) {
assert(!err);
assert.equal(res.stats.pending, 0);
assert.equal(res.stats.passes, 2);
assert.equal(res.stats.passes, 1);
assert.equal(res.stats.failures, 0);

assert.equal(res.passes[0].title,
'should have waited 500ms to run this suite');
'should have no effect if attempted twice in the same suite');
assert.equal(res.code, 0);
done();
});
Expand Down

0 comments on commit 058d00c

Please sign in to comment.