Skip to content

Commit b1314e0

Browse files
committed
test: fix flaky test-inspector-connect-main-thread
Using `console.log()` likely interferes with the functionality of the test, which also checks the interaction between inspector and `console.log()` as part of the test. Using `process._rawDebug()` solves that issue. Refs: nodejs#28870 Refs: nodejs#29582
1 parent 1ecc406 commit b1314e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-inspector-connect-main-thread.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ async function post(session, method, params) {
2727
session.post(method, params, (error, success) => {
2828
messagesSent.push(method);
2929
if (error) {
30-
console.log(`Message ${method} produced an error`);
30+
process._rawDebug(`Message ${method} produced an error`);
3131
reject(error);
3232
} else {
33-
console.log(`Message ${method} was sent`);
33+
process._rawDebug(`Message ${method} was sent`);
3434
resolve(success);
3535
}
3636
});

0 commit comments

Comments
 (0)