-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
107 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
test/integration/fixtures/options/allow-uncaught/this-skip-it.fixture.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters