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
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
test/integration/fixtures/pending/skip-sync-after.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,37 @@ | ||
'use strict'; | ||
var assert = require('assert'); | ||
|
||
describe('skip in after', function () { | ||
it('should run this test-1', function () {}); | ||
|
||
after('should print DeprecationWarning', function () { | ||
this.skip(); | ||
throw new Error('never throws this error'); | ||
}); | ||
after('test should not be marked as pending', function () { | ||
assert(this.currentTest.title === 'should run this test-1'); | ||
assert(this.currentTest.state === 'passed'); | ||
assert(this.currentTest.pending === false); | ||
}); | ||
|
||
|
||
describe('inner suite', function () { | ||
it('should run this test-2', function () {}); | ||
|
||
after('test should not be marked as pending', function () { | ||
assert(this.currentTest.title === 'should run this test-2'); | ||
assert(this.currentTest.state === 'passed'); | ||
assert(this.currentTest.pending === false); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('second suite', function () { | ||
it('should run this test-3', function () {}); | ||
|
||
after('test should not be marked as pending', function () { | ||
assert(this.currentTest.title === 'should run this test-3'); | ||
assert(this.currentTest.state === 'passed'); | ||
assert(this.currentTest.pending === false); | ||
}); | ||
}); |
28 changes: 28 additions & 0 deletions
28
test/integration/fixtures/pending/skip-sync-afterEach.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,28 @@ | ||
'use strict'; | ||
var assert = require('assert'); | ||
|
||
describe('skip in afterEach', function () { | ||
var n = 0; | ||
it('should run this test-1', function () {n = 1;}); | ||
it('should run this test-2', function () {n = 2;}); | ||
|
||
afterEach('should print DeprecationWarning', function () { | ||
this.skip(); | ||
throw new Error('never throws this error'); | ||
}); | ||
afterEach('test should not be marked as pending', function () { | ||
assert(this.currentTest.title === 'should run this test-' + n); | ||
assert(this.currentTest.state === 'passed'); | ||
assert(this.currentTest.pending === false); | ||
}); | ||
}); | ||
|
||
describe('second suite', function () { | ||
it('should run this test-3', function () {}); | ||
|
||
afterEach('test should not be marked as pending', function () { | ||
assert(this.currentTest.title === 'should run this test-3'); | ||
assert(this.currentTest.state === 'passed'); | ||
assert(this.currentTest.pending === false); | ||
}); | ||
}); |
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