Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 0547a42

Browse files
authored
avoid test flake in "delay" test; closes mochajs#2469 (mochajs#2470)
1 parent 24a0213 commit 0547a42

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

test/integration/fixtures/options/delay.js

-5
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

+2-2
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)