Skip to content

feat: inline constant tag transformation #200

feat: inline constant tag transformation

feat: inline constant tag transformation #200

Triggered via pull request May 1, 2024 07:11
Status Failure
Total duration 59s
Artifacts

check.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

4 errors
packages/unminify/src/transformations/__tests__/un-jsx.spec.ts > jsx with dynamic Component tag: packages/unminify/src/transformations/__tests__/un-jsx.spec.ts#L153
AssertionError: expected 'function fn() {\n return React.creat…' to deeply equal 'function fn() {\n const Component = …' - Expected + Received function fn() { - const Component = r ? "a" : "div"; - return <div>Hello</div>; + return React.createElement( + r ? "a" : "div", + null, + "Hello", + ); } ❯ packages/unminify/src/transformations/__tests__/un-jsx.spec.ts:153:1 ❯ packages/test-utils/src/index.ts:32:22
packages/unminify/src/transformations/__tests__/un-jsx.spec.ts > jsx with dynamic Component tag #2: packages/unminify/src/transformations/__tests__/un-jsx.spec.ts#L171
AssertionError: expected 'function fn() {\n return React.creat…' to deeply equal 'function fn() {\n const Component = …' - Expected + Received function fn() { - const Component = components[0]; - return <Component>Hello</Component>; + return React.createElement( + components[0], + null, + "Hello", + ); } ❯ packages/unminify/src/transformations/__tests__/un-jsx.spec.ts:171:1 ❯ packages/test-utils/src/index.ts:32:22
packages/unminify/src/transformations/__tests__/un-jsx.spec.ts > jsx with dynamic Component tag #3: packages/unminify/src/transformations/__tests__/un-jsx.spec.ts#L189
AssertionError: expected 'const Foo = () => {\n return jsxs("d…' to deeply equal 'const Foo = () => {\n const Componen…' - Expected + Received const Foo = () => { - const Component = g ? "p" : "div"; - const Component_1 = r ? "a" : "div"; - return <div><Component_1 key="b">bar</Component_1><Component key={c}>baz</Component></div>; + return jsxs("div", { + children: [ + jsx(r ? "a" : "div", { children: "bar" }, "b"), + jsx(g ? "p" : "div", { children: "baz" }, c), + ] + }); }; ❯ packages/unminify/src/transformations/__tests__/un-jsx.spec.ts:189:1 ❯ packages/test-utils/src/index.ts:32:22
check
Process completed with exit code 1.