Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 037878b

Browse files
committed
Global Mocha timeout
Added the timeout option to the Mocha grunt task; set to 10000. Removed the individual test suite timeouts, for all server tests. Also, added global timeout for Mocha gulp task.
1 parent 19aea2f commit 037878b

File tree

8 files changed

+4
-8
lines changed

8 files changed

+4
-8
lines changed

gruntfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ module.exports = function (grunt) {
173173
mochaTest: {
174174
src: testAssets.tests.server,
175175
options: {
176-
reporter: 'spec'
176+
reporter: 'spec',
177+
timeout: 10000
177178
}
178179
},
179180
mocha_istanbul: {

gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ gulp.task('mocha', function (done) {
172172
// Run the tests
173173
gulp.src(testAssets.tests.server)
174174
.pipe(plugins.mocha({
175-
reporter: 'spec'
175+
reporter: 'spec',
176+
timeout: 10000
176177
}))
177178
.on('error', function (err) {
178179
// If an error occurs, save it

modules/articles/tests/server/article.server.model.tests.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ var user, article;
1717
* Unit tests
1818
*/
1919
describe('Article Model Unit Tests:', function () {
20-
this.timeout(10000);
2120

2221
beforeEach(function (done) {
2322
user = new User({

modules/articles/tests/server/article.server.routes.tests.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ var app, agent, credentials, user, article;
1717
* Article routes tests
1818
*/
1919
describe('Article CRUD tests', function () {
20-
this.timeout(10000);
2120

2221
before(function (done) {
2322
// Get application

modules/chat/tests/server/chat.socket.tests.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Chat socket tests
55
*/
66
describe('Chat Socket Tests:', function () {
7-
this.timeout(10000);
87

98
// TODO: Add chat socket tests
109
});

modules/core/tests/server/core.server.config.tests.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ var should = require('should'),
1111
seed = require(path.resolve('./config/lib/seed'));
1212

1313
describe('Configuration Tests:', function () {
14-
this.timeout(10000);
1514

1615
describe('Testing default seedDB', function () {
1716
before(function(done) {

modules/users/tests/server/user.server.model.tests.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ var user1, user2, user3;
1616
* Unit tests
1717
*/
1818
describe('User Model Unit Tests:', function () {
19-
this.timeout(10000);
2019

2120
before(function () {
2221
user1 = {

modules/users/tests/server/user.server.routes.tests.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ var app, agent, credentials, user, _user, admin;
1616
* User routes tests
1717
*/
1818
describe('User CRUD tests', function () {
19-
this.timeout(10000);
2019

2120
before(function (done) {
2221
// Get application

0 commit comments

Comments
 (0)