Skip to content

Commit

Permalink
adaption of existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Feb 19, 2019
1 parent d679d86 commit 0eb2e65
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
Expand Up @@ -15,7 +15,7 @@ describe('outer suite', function () {
var self = this;
setTimeout(function () {
self.skip();
done();
// done();
}, 0);
});

Expand Down
Expand Up @@ -3,7 +3,7 @@ describe('skip in before with nested describes', function () {
var self = this;
setTimeout(function () {
self.skip();
done();
// done();
}, 0);
});

Expand Down
Expand Up @@ -5,17 +5,17 @@ describe('skip in beforeEach', function () {
var self = this;
setTimeout(function () {
self.skip();
done();
// done();
}, 0);
});

it('should skip this test', function () {
it('should skip this test-1', function () {
throw new Error('never run this test');
});
it('should not reach this test', function () {
it('should skip this test-2', function () {
throw new Error('never run this test');
});
it('should not reach this test', function () {
it('should skip this test-3', function () {
throw new Error('never run this test');
});
});
23 changes: 13 additions & 10 deletions test/integration/pending.spec.js
Expand Up @@ -258,18 +258,21 @@ describe('pending', function() {

describe('in beforeEach', function() {
it('should skip all suite specs', function(done) {
run('pending/skip-async-beforeEach.fixture.js', args, function(
err,
res
) {
var fixture = 'pending/skip-async-beforeEach.fixture.js';
run(fixture, args, function(err, res) {
if (err) {
done(err);
return;
return done(err);
}
assert.strictEqual(res.stats.pending, 1);
assert.strictEqual(res.stats.passes, 0);
assert.strictEqual(res.stats.failures, 1);
assert.strictEqual(res.code, 1);
expect(res, 'to have passed')
.and('to have passed test count', 0)
.and('to have pending test count', 3)
.and(
'to have pending test order',
'should skip this test-1',
'should skip this test-2',
'should skip this test-3'
)
.and('to have failed test count', 0);
done();
});
});
Expand Down

0 comments on commit 0eb2e65

Please sign in to comment.