Skip to content

Commit

Permalink
adapt existing test
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Jan 3, 2020
1 parent c6303a9 commit 824a52c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
3 changes: 1 addition & 2 deletions test/integration/fixtures/pending/skip-sync-after.fixture.js
Expand Up @@ -3,9 +3,8 @@
describe('skip in after', function () {
it('should run this test-1', function () {});

after('should print DeprecationWarning', function () {
after('should throw "this.skip forbidden"', function () {
this.skip();
throw new Error('never throws this error');
});

describe('inner suite', function () {
Expand Down
35 changes: 17 additions & 18 deletions test/integration/pending.spec.js
Expand Up @@ -73,24 +73,23 @@ describe('pending', function() {
});

describe('in after', function() {
it('should run all tests', function(done) {
runMocha(
'pending/skip-sync-after.fixture.js',
args,
function(err, res) {
if (err) {
return done(err);
}
expect(res, 'to have passed').and('to satisfy', {
passing: 3,
failing: 0,
pending: 0,
output: expect.it('to contain', '"after all" hook is DEPRECATED')
});
done();
},
'pipe'
);
it('should throw, but run all tests', function(done) {
run('pending/skip-sync-after.fixture.js', args, function(err, res) {
if (err) {
return done(err);
}
expect(res, 'to have failed with error', '`this.skip` forbidden')
.and('to have failed test count', 1)
.and('to have pending test count', 0)
.and('to have passed test count', 3)
.and(
'to have passed test order',
'should run this test-1',
'should run this test-2',
'should run this test-3'
);
done();
});
});
});

Expand Down

0 comments on commit 824a52c

Please sign in to comment.