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

Function testNoCrashWithExceptionInCallback

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

Source from the content-addressed store, hash-verified

45}
46
47async function testNoCrashWithExceptionInCallback() {
48 // There is a deliberate exception in the callback
49 const session = new inspector.Session();
50 session.connect();
51 const error = new Error('We expect this');
52 console.log('Expecting warning to be emitted');
53 const promise = new Promise(waitForWarningSkipAsyncStackTraces);
54 session.post('Console.enable', () => { throw error; });
55 assert.strictEqual(await promise, error);
56 session.disconnect();
57}
58
59function testSampleDebugSession() {
60 let cur = 0;

Callers 1

doTestsFunction · 0.85

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…