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

Function testUnintendedCallerCensorship

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

Source from the content-addressed store, hash-verified

214
215// Test that the explicit constructor call is shown in the trace
216function testUnintendedCallerCensorship() {
217 var threw = false;
218 try {
219 new ReferenceError({
220 toString: function () {
221 FAIL;
222 }
223 });
224 } catch (e) {
225 assertTrue(e.stack.indexOf('at new ReferenceError') != -1,
226 "UnintendedCallerCensorship didn't contain new ReferenceError");
227 threw = true;
228 }
229 assertTrue(threw, "UnintendedCallerCensorship didn't throw");
230}
231
232// If an error occurs while the stack trace is being formatted it should
233// be handled gracefully.

Callers 1

stack-traces.jsFile · 0.85

Calls 2

assertTrueFunction · 0.70
indexOfMethod · 0.45

Tested by

no test coverage detected