Skip to content

Commit bd3cef7

Browse files
Trottaddaleax
authored andcommitted
test: use mustCall() in pummel test
Replace 'exit' check with common.mustCall(). PR-URL: #34327 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 0ede223 commit bd3cef7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎test/pummel/test-net-connect-econnrefused.js‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,14 @@ function pummel(){
4848
}
4949

5050
functioncheck(){
51-
setTimeout(function(){
51+
setTimeout(common.mustCall(function(){
5252
assert.strictEqual(process._getActiveRequests().length,0);
5353
constactiveHandles=process._getActiveHandles();
5454
assert.ok(activeHandles.every((val)=>val.constructor.name!=='Socket'));
55-
check_called=true;
56-
},0);
55+
}),0);
5756
}
58-
letcheck_called=false;
5957

6058
process.on('exit',function(){
6159
assert.strictEqual(rounds,ROUNDS);
6260
assert.strictEqual(reqs,ROUNDS*ATTEMPTS_PER_ROUND);
63-
assert(check_called);
6461
});

0 commit comments

Comments
(0)