Skip to content

Commit 058d00c

Browse files
committed
avoid test flake in "delay" test; closes #2469
1 parent 95e524c commit 058d00c

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

test/integration/fixtures/options/delay.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
var assert = require('assert');
22
var delay = 500;
3-
var start = new Date().getTime();
43

54
setTimeout(function() {
65
describe('delayed execution', function() {
7-
it('should have waited ' + delay + 'ms to run this suite', function() {
8-
assert(new Date().getTime() - delay >= start);
9-
});
10-
116
it('should have no effect if attempted twice in the same suite', function() {
127
assert(true);
138
run();

test/integration/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ describe('options', function() {
8585
run('options/delay.js', args, function(err, res) {
8686
assert(!err);
8787
assert.equal(res.stats.pending, 0);
88-
assert.equal(res.stats.passes, 2);
88+
assert.equal(res.stats.passes, 1);
8989
assert.equal(res.stats.failures, 0);
9090

9191
assert.equal(res.passes[0].title,
92-
'should have waited 500ms to run this suite');
92+
'should have no effect if attempted twice in the same suite');
9393
assert.equal(res.code, 0);
9494
done();
9595
});

0 commit comments

Comments
 (0)