Skip to content

Commit 58dfeac

Browse files
TrottMylesBorins
authored andcommitted
test: use mustCall() in pummel test
Replace 'exit' check with common.mustCall(). PR-URL: #34327 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 02ea320 commit 58dfeac

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎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)