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

Method test

lib/internal/test_runner/test.js:378–395  ·  view source on GitHub ↗
(name, options, fn)

Source from the content-addressed store, hash-verified

376 }
377
378 test(name, options, fn) {
379 const overrides = {
380 __proto__: null,
381 loc: getCallerLocation(),
382 };
383
384 const { plan } = this.#test;
385 if (plan !== null) {
386 plan.count();
387 }
388
389 const subtest = this.#test.createSubtest(
390 // eslint-disable-next-line no-use-before-define
391 Test, name, options, fn, overrides,
392 );
393
394 return subtest.start();
395 }
396
397 before(fn, options) {
398 this.#test.createHook('before', fn, {

Callers 2

onerrorFunction · 0.45
SNICallbackFunction · 0.45

Calls 3

createSubtestMethod · 0.80
countMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected