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

Function testCallerCensorship

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

Source from the content-addressed store, hash-verified

201
202// Test that the error constructor is not shown in the trace
203function testCallerCensorship() {
204 var threw = false;
205 try {
206 FAIL;
207 } catch (e) {
208 assertEquals(-1, e.stack.indexOf('at new ReferenceError'),
209 "CallerCensorship contained new ReferenceError");
210 threw = true;
211 }
212 assertTrue(threw, "CallerCensorship didn't throw");
213}
214
215// Test that the explicit constructor call is shown in the trace
216function testUnintendedCallerCensorship() {

Callers 1

stack-traces.jsFile · 0.85

Calls 3

assertTrueFunction · 0.70
assertEqualsFunction · 0.50
indexOfMethod · 0.45

Tested by

no test coverage detected