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: https://github.com/nodejs/node/pull/28870 Refs: https://github.com/nodejs/node/pull/29582 PR-URL: https://github.com/nodejs/node/pull/29588 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
49cf67efd6
commit
3adec43791
@ -27,10 +27,10 @@ async function post(session, method, params) {
|
||||
session.post(method, params, (error, success) => {
|
||||
messagesSent.push(method);
|
||||
if (error) {
|
||||
console.log(`Message ${method} produced an error`);
|
||||
process._rawDebug(`Message ${method} produced an error`);
|
||||
reject(error);
|
||||
} else {
|
||||
console.log(`Message ${method} was sent`);
|
||||
process._rawDebug(`Message ${method} was sent`);
|
||||
resolve(success);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user