Skip to content

Commit

Permalink
Fixes: tagged slow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WaleedAshraf committed May 16, 2019
1 parent ffbcbf6 commit 2d19e82
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/integration/compiler-globbing.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var path = require('path');

describe('globbing like --compilers', function() {
it('should find a file of each type', function(done) {
this.slow(900);
exec(
'"' +
process.execPath +
Expand Down
1 change: 1 addition & 0 deletions test/integration/glob.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var path = require('path');
var node = '"' + process.execPath + '"';

describe('globbing', function() {
this.slow(600);
describe('by the shell', function() {
it('should find the first level test', function(done) {
testGlob.shouldSucceed(
Expand Down
1 change: 1 addition & 0 deletions test/integration/hooks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var splitRegExp = require('./helpers').splitRegExp;
var args = ['--reporter', 'dot'];

describe('hooks', function() {
this.slow(900);
it('are ran in correct order', function(done) {
runMocha('cascade.fixture.js', args, function(err, res) {
var lines, expected;
Expand Down
1 change: 1 addition & 0 deletions test/integration/no-diff.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var helpers = require('./helpers');
var run = helpers.runMocha;

describe('no-diff', function() {
this.slow(900);
describe('when enabled', function() {
it('should not display a diff', function(done) {
run('no-diff.fixture.js', ['--no-diff'], function(err, res) {
Expand Down
1 change: 1 addition & 0 deletions test/integration/only.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var run = require('./helpers').runMochaJSON;
var assert = require('assert');

describe('.only()', function() {
this.slow(900);
describe('bdd', function() {
it('should run only tests that marked as `only`', function(done) {
run('options/only/bdd.fixture.js', ['--ui', 'bdd'], function(err, res) {
Expand Down
1 change: 1 addition & 0 deletions test/integration/pending.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var splitRegExp = require('./helpers').splitRegExp;
var args = [];

describe('pending', function() {
this.slow(900);
describe('pending specs', function() {
it('should be created by omitting a function', function(done) {
run('pending/spec.fixture.js', args, function(err, res) {
Expand Down
1 change: 1 addition & 0 deletions test/integration/regression.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var run = require('./helpers').runMocha;
var runJSON = require('./helpers').runMochaJSON;

describe('regressions', function() {
this.slow(900);
it('issue-1327: should run all 3 specs exactly once', function(done) {
var args = [];
run('regression/issue-1327.fixture.js', args, function(err, res) {
Expand Down
2 changes: 2 additions & 0 deletions test/integration/reporters.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe('reporters', function() {

describe('xunit', function() {
it('prints test cases with --reporter-options output (issue: 1864)', function(done) {
this.slow(900);
var randomStr = crypto.randomBytes(8).toString('hex');
var tmpDir = os.tmpdir().replace(new RegExp(path.sep + '$'), '');
var tmpFile = tmpDir + path.sep + 'test-issue-1864-' + randomStr + '.xml';
Expand Down Expand Up @@ -66,6 +67,7 @@ describe('reporters', function() {
});

describe('loader', function() {
this.slow(950);
it('loads a reporter from a path relative to the current working directory', function(done) {
var reporterAtARelativePath =
'test/integration/fixtures/simple-reporter.js';
Expand Down
1 change: 1 addition & 0 deletions test/integration/retries.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var args = [];
var bang = require('../../lib/reporters/base').symbols.bang;

describe('retries', function() {
this.slow(950);
it('are ran in correct order', function(done) {
helpers.runMocha(
'retries/hooks.fixture.js',
Expand Down
1 change: 1 addition & 0 deletions test/integration/timeout.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var args = [];

describe('this.timeout()', function() {
it('is respected by sync and async suites', function(done) {
this.slow(900);
run('timeout.fixture.js', args, function(err, res) {
if (err) {
done(err);
Expand Down
1 change: 1 addition & 0 deletions test/integration/uncaught.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var run = require('./helpers').runMochaJSON;
var args = [];

describe('uncaught exceptions', function() {
this.slow(900);
it('handles uncaught exceptions from hooks', function(done) {
run('uncaught-hook.fixture.js', args, function(err, res) {
if (err) {
Expand Down
1 change: 1 addition & 0 deletions test/unit/timeout.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('timeouts', function() {

it('should allow overriding per-test', function(done) {
this.timeout(200);
this.slow(200);
setTimeout(function() {
done();
}, 50);
Expand Down

0 comments on commit 2d19e82

Please sign in to comment.