Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

increase integration test timeouts across-the-board for AppVeyor

Christopher Hillerb45b3c883870
diff --git a/Makefile b/Makefile
index 22f3649f..31365aaf 100644
--- a/Makefile
+++ b/Makefile
@@ -77,6 +77,7 @@ test-unit:
test-integration:
@printf "==> [Test :: Integrations]\n"
@./bin/mocha \
+ --timeout 5000 \
--reporter $(REPORTER) \
test/integration/*.js
diff --git a/test/integration/diffs.js b/test/integration/diffs.js
index 25d9ae6d..111b6f20 100644
--- a/test/integration/diffs.js
+++ b/test/integration/diffs.js
@@ -15,7 +15,6 @@ function getExpectedOutput() {
describe('diffs', function() {
var diffs, expected;
- this.timeout(2000);
before(function(done) {
run('diffs/diffs.js', ['-C'], function(err, res) {
diff --git a/test/integration/fixtures/regression/issue-1991.js b/test/integration/fixtures/regression/issue-1991.js
index ee08a1d0..7c1eb19b 100644
--- a/test/integration/fixtures/regression/issue-1991.js
+++ b/test/integration/fixtures/regression/issue-1991.js
@@ -38,8 +38,6 @@ for (var i = 0; i < numOfTests; i += 1) {
});
it('access a variable via a closure', function () {
- // slow performance on older node.js versions
- this.timeout(2000);
closureVar = new MemoryLeak();
});
diff --git a/test/integration/hook.err.js b/test/integration/hook.err.js
index 5cdde133..f3a16c15 100644
--- a/test/integration/hook.err.js
+++ b/test/integration/hook.err.js
@@ -4,8 +4,6 @@ var splitRegExp = require('./helpers').splitRegExp;
var bang = require('../../lib/reporters/base').symbols.bang;
describe('hook error handling', function() {
- this.timeout(2000);
-
var lines;
describe('before hook error', function() {
diff --git a/test/integration/hooks.js b/test/integration/hooks.js
index 17958560..acd829f7 100644
--- a/test/integration/hooks.js
+++ b/test/integration/hooks.js
@@ -4,8 +4,6 @@ var splitRegExp = require('./helpers').splitRegExp;
var args = [];
describe('hooks', function() {
- this.timeout(2000);
-
it('are ran in correct order', function(done) {
run('cascade.js', args, function(err, res) {
var lines, expected;
diff --git a/test/integration/multiple.done.js b/test/integration/multiple.done.js
index d9d9645f..0159e90e 100644
--- a/test/integration/multiple.done.js
+++ b/test/integration/multiple.done.js
@@ -4,8 +4,6 @@ var args = [];
describe('multiple calls to done()', function() {
var res;
- this.timeout(2000);
-
describe('from a spec', function() {
before(function(done) {
run('multiple.done.js', args, function(err, result) {
diff --git a/test/integration/only.js b/test/integration/only.js
index 52c11a3a..3d0e4dc6 100644
--- a/test/integration/only.js
+++ b/test/integration/only.js
@@ -2,8 +2,6 @@ var run = require('./helpers').runMochaJSON;
var assert = require('assert');
describe('.only()', function() {
- this.timeout(2000);
-
it('should run only tests that marked as `only`', function(done) {
run('options/only/bdd.js', ['--ui', 'bdd'], function(err, res) {
assert(!err);
@@ -36,4 +34,4 @@ describe('.only()', function() {
done();
});
});
-});
\ No newline at end of file
+});
diff --git a/test/integration/options.js b/test/integration/options.js
index afd961b3..5e18ac5e 100644
--- a/test/integration/options.js
+++ b/test/integration/options.js
@@ -3,8 +3,6 @@ var run = require('./helpers').runMochaJSON;
var args = [];
describe('options', function() {
- this.timeout(2000);
-
describe('--async-only', function() {
before(function() {
diff --git a/test/integration/pending.js b/test/integration/pending.js
index 6d63b1fa..0c18ab4b 100644
--- a/test/integration/pending.js
+++ b/test/integration/pending.js
@@ -4,8 +4,6 @@ var args = [];
describe('pending', function() {
describe('pending specs', function() {
- this.timeout(2000);
-
it('should be created by omitting a function', function(done) {
run('pending/spec.js', args, function(err, res) {
assert(!err);
@@ -19,8 +17,6 @@ describe('pending', function() {
});
describe('synchronous skip()', function() {
- this.timeout(2000);
-
describe('in spec', function() {
it('should immediately skip the spec and run all others', function(done) {
run('pending/skip.sync.spec.js', args, function(err, res) {
@@ -62,8 +58,6 @@ describe('pending', function() {
});
describe('asynchronous skip()', function() {
- this.timeout(2000);
-
describe('in spec', function() {
it('should immediately skip the spec and run all others', function(done) {
run('pending/skip.async.spec.js', args, function(err, res) {
diff --git a/test/integration/regression.js b/test/integration/regression.js
index 6e6606a5..3d132a6e 100644
--- a/test/integration/regression.js
+++ b/test/integration/regression.js
@@ -4,8 +4,6 @@ var path = require('path');
var run = require('./helpers').runMocha;
describe('regressions', function() {
- this.timeout(2000);
-
it('issue-1327: should run all 3 specs exactly once', function(done) {
var args = [];
run('regression/issue-1327.js', args, function(err, res) {
diff --git a/test/integration/reporters.js b/test/integration/reporters.js
index 19cf0bdd..c2f022fe 100644
--- a/test/integration/reporters.js
+++ b/test/integration/reporters.js
@@ -6,8 +6,6 @@ var path = require('path');
var run = require('./helpers').runMocha;
describe('reporters', function() {
- this.timeout(3000);
-
describe('markdown', function() {
var res;
diff --git a/test/integration/retries.js b/test/integration/retries.js
index a24fc482..56516b3a 100644
--- a/test/integration/retries.js
+++ b/test/integration/retries.js
@@ -4,8 +4,6 @@ var args = [];
var bang = require('../../lib/reporters/base').symbols.bang;
describe('retries', function() {
- this.timeout(2000);
-
it('are ran in correct order', function(done) {
helpers.runMocha('retries/hooks.js', args, function(err, res) {
var lines, expected;
diff --git a/test/integration/timeout.js b/test/integration/timeout.js
index c8321c0b..b2dfb201 100644
--- a/test/integration/timeout.js
+++ b/test/integration/timeout.js
@@ -3,8 +3,6 @@ var run = require('./helpers').runMochaJSON;
var args = [];
describe('this.timeout()', function() {
- this.timeout(2000);
-
it('is respected by sync and async suites', function(done) {
run('timeout.js', args, function(err, res) {
assert(!err);
diff --git a/test/integration/uncaught.js b/test/integration/uncaught.js
index 2ca186e4..92a0ce5d 100644
--- a/test/integration/uncaught.js
+++ b/test/integration/uncaught.js
@@ -3,8 +3,6 @@ var run = require('./helpers').runMochaJSON;
var args = [];
describe('uncaught exceptions', function() {
- this.timeout(2000);
-
it('handles uncaught exceptions from hooks', function(done) {
run('uncaught.hook.js', args, function(err, res) {
assert(!err);