MCPcopy Create free account
hub / github.com/nodejs/node / testTraceNativeConstructor

Function testTraceNativeConstructor

deps/v8/test/mjsunit/stack-traces.js:254–262  ·  view source on GitHub ↗
(nativeFunc)

Source from the content-addressed store, hash-verified

252// Tests that a native constructor function is included in the
253// stack trace.
254function testTraceNativeConstructor(nativeFunc) {
255 var nativeFuncName = nativeFunc.name;
256 try {
257 new nativeFunc(thrower);
258 assertUnreachable(nativeFuncName);
259 } catch (e) {
260 assertTrue(e.stack.indexOf(nativeFuncName) >= 0, nativeFuncName);
261 }
262}
263
264// Tests that a native conversion function is included in the
265// stack trace.

Callers 1

stack-traces.jsFile · 0.70

Calls 3

assertUnreachableFunction · 0.85
assertTrueFunction · 0.70
indexOfMethod · 0.45

Tested by

no test coverage detected