Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid test flake in "delay" test; closes #2469 #2470

Merged
merged 1 commit into from Sep 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions test/integration/fixtures/options/delay.js
@@ -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
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