-
-
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.
Deprecate this.skip() for "after all" hooks (#3719)
Print a DeprecationWarning when `this.skip()` is used in `after` hooks.
- Loading branch information
Showing
4 changed files
with
52 additions
and
4 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
18 changes: 18 additions & 0 deletions
18
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,18 @@ | ||
'use strict'; | ||
|
||
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'); | ||
}); | ||
|
||
describe('inner suite', function () { | ||
it('should run this test-2', function () {}); | ||
}); | ||
}); | ||
|
||
describe('second suite', function () { | ||
it('should run this test-3', function () {}); | ||
}); |
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