MCPcopy
hub / github.com/lingodotdev/lingo.dev / runMutation

Function runMutation

packages/compiler/src/jsx-attribute-flag.spec.ts:6–11  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

4
5// Helper function to run mutation and get result
6function runMutation(code: string) {
7 const input = createPayload({ code, params: defaultParams, fileKey: "test" });
8 const mutated = jsxAttributeFlagMutation(input);
9 if (!mutated) throw new Error("Mutation returned null");
10 return createOutput(mutated).code;
11}
12
13describe("jsxAttributeFlagMutation", () => {
14 it("should add data-jsx-attribute-scope to elements with title attribute", () => {

Callers 1

Calls 2

createPayloadFunction · 0.90
createOutputFunction · 0.90

Tested by

no test coverage detected