()
| 644 | }); |
| 645 | |
| 646 | export const runTestsForJsx = () => { |
| 647 | test('Remove Internal mitosis package', async () => { |
| 648 | const component = parseJsx((await basicMitosis).code, { |
| 649 | compileAwayPackages: ['@dummy/custom-mitosis'], |
| 650 | }); |
| 651 | expect(component).toMatchSnapshot(); |
| 652 | }); |
| 653 | |
| 654 | const configurations: Array<Parameters<typeof parseJsx>[1] & { testName: string }> = [ |
| 655 | { typescript: true, testName: 'Typescript' }, |
| 656 | { typescript: false, testName: 'Javascript' }, |
| 657 | ]; |
| 658 | |
| 659 | configurations.forEach((config) => { |
| 660 | describe(config.testName, () => { |
| 661 | JSX_TESTS.forEach((tests) => { |
| 662 | Object.keys(tests).forEach((key) => { |
| 663 | test(key, async () => { |
| 664 | const singleTest = tests[key]; |
| 665 | const testPromise = isTestWithFailFor(singleTest) ? singleTest.file : singleTest; |
| 666 | const t = await testPromise; |
| 667 | const component = parseJsx(t.code, { ...config, filePath: t.filePath }); |
| 668 | expect(component).toMatchSnapshot(); |
| 669 | }); |
| 670 | }); |
| 671 | }); |
| 672 | }); |
| 673 | }); |
| 674 | }; |
| 675 | export const runTestsForSvelteSyntax = () => { |
| 676 | Object.keys(SVELTE_SYNTAX_TESTS).forEach((key) => { |
| 677 | test(key, async () => { |
no test coverage detected