MCPcopy
hub / github.com/webpack/webpack / it

Function it

test/helpers/createLazyTestEnv.js:113–128  ·  view source on GitHub ↗
(/** @type {unknown[]} */ ...args)

Source from the content-addressed store, hash-verified

111 return numberOfTests;
112 },
113 it(/** @type {unknown[]} */ ...args) {
114 numberOfTests++;
115 if (runTests >= numberOfTests) throw new Error("it called too late");
116 args[1] = createDisposableFn(
117 /** @type {AnyFn | undefined} */ (args[1]),
118 true
119 );
120 args[2] = args[2] || globalTimeout;
121 inSuite(() => {
122 // @ts-expect-error expected
123 it(...args);
124 fixAsyncError(
125 currentDescribeBlock.tests[currentDescribeBlock.tests.length - 1]
126 );
127 });
128 },
129 beforeEach(/** @type {unknown[]} */ ...args) {
130 if (runTests >= numberOfTests) {
131 throw new Error("beforeEach called too late");

Calls 3

createDisposableFnFunction · 0.85
inSuiteFunction · 0.85
fixAsyncErrorFunction · 0.85

Tested by

no test coverage detected