Skip to content

Commit

Permalink
additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Oct 7, 2019
1 parent 75b5069 commit a1bd5dd
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
@@ -0,0 +1,21 @@
'use strict';

describe('test suite', () => {
it('test1', function () { });
it('test2', function (done) {
var self = this;
setTimeout(function () {
self.skip();
throw new Error("should not throw");
}, 10);
});
it('test3', function () {
this.skip();
throw new Error("should not throw");
});
it('test4', function () { });
it('test5', function () {
this.skip();
throw new Error("should not throw");
});
});
25 changes: 25 additions & 0 deletions test/integration/options/allowUncaught.spec.js
@@ -0,0 +1,25 @@
'use strict';

var path = require('path').posix;
var helpers = require('../helpers');
var runMochaJSON = helpers.runMochaJSON;

describe('--allow-uncaught', function() {
var args = ['--allow-uncaught'];

it('should run with conditional `this.skip()`', function(done) {
var fixture = path.join('options', 'allow-uncaught', 'this-skip-it');
runMochaJSON(fixture, args, function(err, res) {
if (err) {
return done(err);
}

expect(res, 'to have passed')
.and('to have passed test count', 2)
.and('to have pending test count', 3)
.and('to have passed test', 'test1', 'test4')
.and('to have pending test order', 'test2', 'test3', 'test5');
done();
});
});
});

0 comments on commit a1bd5dd

Please sign in to comment.