MCPcopy
hub / github.com/webpack/webpack / test

Function test

test/Cli.basictest.js:144–159  ·  view source on GitHub ↗
(
			/** @type {string} */ name,
			/** @type {Record<string, EXPECTED_ANY>} */ values,
			/** @type {import("../").Configuration} */ config,
			/** @type {(e: EXPECTED_ANY) => void} */ fn
		)

Source from the content-addressed store, hash-verified

142
143 describe("processArguments", () => {
144 const test = (
145 /** @type {string} */ name,
146 /** @type {Record<string, EXPECTED_ANY>} */ values,
147 /** @type {import("../").Configuration} */ config,
148 /** @type {(e: EXPECTED_ANY) => void} */ fn
149 ) => {
150 it(`should correctly process arguments for ${name}`, () => {
151 const args = getArguments();
152 const problems = processArguments(
153 args,
154 config,
155 /** @type {import("../lib/cli").Values} */ (values)
156 );
157 fn(expect(problems || config));
158 });
159 };
160
161 test("none", {}, {}, (e) => e.toMatchInlineSnapshot("Object {}"));
162

Callers 1

Cli.basictest.jsFile · 0.70

Calls 4

getArgumentsFunction · 0.85
processArgumentsFunction · 0.85
itFunction · 0.50
fnFunction · 0.50

Tested by

no test coverage detected