Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 712293e

Browse files
committed
[Test] Previous test should not affect next test after refreshing.
1 parent 4773456 commit 712293e

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

tests/tests/node/node.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,11 @@ describe('require', function() {
3232

3333
describe('node', function() {
3434

35-
var mocha_callback;
36-
3735
before(function() {
38-
mocha_callback = process.listeners('uncaughtException')[1];
36+
var mocha_callback = process.listeners('uncaughtException')[1];
3937
process.removeListener('uncaughtException', mocha_callback);
4038
});
4139

42-
after(function() {
43-
process.on('uncaughtException', mocha_callback);
44-
});
45-
4640
describe('process', function() {
4741
it('uncaughtException should have a default listener', function() {
4842
assert.equal(process.listeners('uncaughtException').length, 1);

0 commit comments

Comments
 (0)