File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22require ( '../common' ) ;
3+ var common = require ( '../common' ) ;
34var assert = require ( 'assert' ) ;
45var domain = require ( 'domain' ) ;
5- var disposalFailed = false ;
66
77// no matter what happens, we should increment a 10 times.
88var a = 0 ;
@@ -22,11 +22,7 @@ function err() {
2222 function err2 ( ) {
2323 // this timeout should never be called, since the domain gets
2424 // disposed when the error happens.
25- setTimeout ( function ( ) {
26- console . error ( 'This should not happen.' ) ;
27- disposalFailed = true ;
28- process . exit ( 1 ) ;
29- } ) ;
25+ setTimeout ( common . mustCall ( ( ) => { } , 0 ) , 1 ) ;
3026
3127 // this function doesn't exist, and throws an error as a result.
3228 err3 ( ) ; // eslint-disable-line no-undef
@@ -41,7 +37,6 @@ function err() {
4137}
4238
4339process . on ( 'exit' , function ( ) {
44- assert . equal ( a , 10 ) ;
45- assert . equal ( disposalFailed , false ) ;
40+ assert . strictEqual ( a , 10 ) ;
4641 console . log ( 'ok' ) ;
4742} ) ;
You can’t perform that action at this time.
0 commit comments