MCPcopy
hub / github.com/webpack/webpack / beforeEach

Function beforeEach

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

Source from the content-addressed store, hash-verified

127 });
128 },
129 beforeEach(/** @type {unknown[]} */ ...args) {
130 if (runTests >= numberOfTests) {
131 throw new Error("beforeEach called too late");
132 }
133 args[0] = createDisposableFn(/** @type {AnyFn | undefined} */ (args[0]));
134 inSuite(() => {
135 // @ts-expect-error expected
136 beforeEach(...args);
137 fixAsyncError(
138 currentDescribeBlock.hooks[currentDescribeBlock.hooks.length - 1]
139 );
140 });
141 },
142 afterEach(/** @type {unknown[]} */ ...args) {
143 if (runTests >= numberOfTests) {
144 throw new Error("afterEach called too late");

Calls 3

createDisposableFnFunction · 0.85
inSuiteFunction · 0.85
fixAsyncErrorFunction · 0.85

Tested by

no test coverage detected