MCPcopy Index your code
hub / github.com/nodejs/node / testConsoleLog

Function testConsoleLog

test/parallel/test-inspector-overwrite-config.js:26–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24let asserted = false;
25
26async function testConsoleLog() {
27 const session = new inspector.Session();
28 session.connect();
29 session.on('inspectorNotification', common.mustCallAtLeast((data) => {
30 if (data.method === 'Runtime.consoleAPICalled') {
31 assert.strictEqual(data.params.args.length, 1);
32 assert.strictEqual(data.params.args[0].value, msg);
33 asserted = true;
34 }
35 }));
36 session.post('Runtime.enable');
37 console.log(msg);
38 session.disconnect();
39}
40
41async function runTests() {
42 await testConsoleLog();

Callers 1

runTestsFunction · 0.85

Calls 5

connectMethod · 0.95
postMethod · 0.95
disconnectMethod · 0.95
onMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…