diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/basic/jsx-member/input/module.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/basic/jsx-member/input/module.tsx new file mode 100644 index 0000000000000..752d8aaa4a00f --- /dev/null +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/next/basic/jsx-member/input/module.tsx @@ -0,0 +1 @@ +export const Named = ({ children }) =>
{children}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/basic/jsx-member/input/pages/index.js b/packages/next-swc/crates/next-dev-tests/tests/integration/next/basic/jsx-member/input/pages/index.js new file mode 100644 index 0000000000000..a1072dc99e1f6 --- /dev/null +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/next/basic/jsx-member/input/pages/index.js @@ -0,0 +1,26 @@ +import { useTestHarness } from '@turbo/pack-test-harness' +import * as Named from '../module.tsx' + +export default function Page() { + useTestHarness(runTests) + + const object = { Named: Named.Named } + const object2 = { Named } + + return ( + <> + Hello World + Hello There + Hello You + + ) +} + +function runTests() { + it('should render the element', () => { + const html = document.body.innerHTML + expect(html).toContain('Hello World') + expect(html).toContain('Hello There') + expect(html).toContain('Hello You') + }) +}