Skip to content

Commit 919f31f

Browse files
committed
test: wrap inspector HTTP handler in mustCall
1 parent 553ef5f commit 919f31f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/parallel/test-inspector-network-http.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function getPathName(req) {
6262
return new URL(req.url, `http://${req.headers.host}`).pathname;
6363
}
6464

65-
const handleRequest = (req, res) => {
65+
const handleRequest = common.mustCall((req, res) => {
6666
const path = getPathName(req);
6767
switch (path) {
6868
case '/hello-world':
@@ -116,7 +116,7 @@ const handleRequest = (req, res) => {
116116
default:
117117
assert.fail(`Unexpected path: ${path}`);
118118
}
119-
};
119+
}, 5);
120120

121121
const httpServer = http.createServer(handleRequest);
122122

@@ -130,7 +130,7 @@ const terminate = () => {
130130
httpServer.close();
131131
httpsServer.close();
132132
inspector.close();
133-
};
133+
}, 7);
134134

135135
function findFrameInInitiator(scriptName, initiator) {
136136
const frame = initiator.stack.callFrames.find((it) => {

0 commit comments

Comments
 (0)