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

Function test

deps/v8/test/mjsunit/async-stack-traces-realms.js:20–28  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

18 })`);
19
20 async function test(f) {
21 try {
22 await f(new Promise(resolve => setTimeout(resolve)));
23 assertUnreachable();
24 } catch (e) {
25 assertInstanceof(e, Realm.global(realm).Error);
26 assertMatches(/Error.+at two.+at async one.+at async test/ms, e.stack);
27 }
28 }
29
30 assertPromiseResult((async () => {
31 %PrepareFunctionForOptimization(one);

Callers 1

Calls 5

assertUnreachableFunction · 0.85
assertInstanceofFunction · 0.85
globalMethod · 0.80
fFunction · 0.70
setTimeoutFunction · 0.50

Tested by

no test coverage detected