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

Function y

deps/v8/test/mjsunit/harmony/public-static-class-fields.js:342–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

340}
341
342function y() {
343 // This tests lazy parsing.
344 return function() {
345 let log = [];
346 function run(i) {
347 log.push(i);
348 return i;
349 }
350
351 class C {
352 [run(1)] = run(7);
353 [run(2)] = run(8);
354 [run(3)]() { run(9);}
355 static [run(4)] = run(6);
356 [run(5)]() { throw new Error('should not execute');};
357 }
358
359 let c = new C;
360 c[3]();
361 assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], log);
362 }
363}
364y()();
365
366{

Callers 1

Calls 1

assertEqualsFunction · 0.50

Tested by

no test coverage detected