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

Function testNoCrashConsoleLogBeforeThrow

test/parallel/test-inspector-bindings.js:103–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101}
102
103async function testNoCrashConsoleLogBeforeThrow() {
104 const session = new inspector.Session();
105 session.connect();
106 let attempt = 1;
107 process.on('warning', common.mustCall(3));
108 session.on('inspectorNotification', () => {
109 if (attempt++ > 3)
110 return;
111 console.log('console.log in handler');
112 throw new Error('Exception in handler');
113 });
114 session.post('Runtime.enable');
115 console.log('Did not crash');
116 session.disconnect();
117}
118
119async function doTests() {
120 await testNoCrashWithExceptionInCallback();

Callers 1

doTestsFunction · 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…