playwright/tests/components/ct-react-vite
Simon Knott 208a54529d
fix(ct-react): support shorthand fragment notation (#32900)
Closes https://github.com/microsoft/playwright/issues/32853

Vite turns the shorthand fragment notation `<></>` into `import {
Fragment } from "react"; <Fragment></Fragment>`. On the Node.js side of
things, this `react` import resolves to our mock version of React, which
currently mocks `Fragment` as `{}`. Currently, we pass that straight to
`React.createElement`, which throws an error.

The fix is to make our `Fragment` mock detectable with a tag, and when
we render it replace it with the real `__pwReact.Fragment`.
2024-10-02 11:19:09 +02:00
..
playwright feat(ct): before mount hook wrapper (#18616) 2022-12-27 14:26:17 -08:00
src chore(ui): enable react/recommended lint rules (#32214) 2024-08-20 14:16:28 +02:00
tests fix(ct-react): support shorthand fragment notation (#32900) 2024-10-02 11:19:09 +02:00
.gitignore fix(debug): do not pause on internal calls, update ct docs (#14018) 2022-05-07 19:56:25 -07:00
index.html fix(ct): render attributes (#17991) 2022-10-18 13:02:53 -07:00
package.json feat(ct): experimental route fixture (#31554) 2024-07-06 09:35:20 -07:00
playwright.config.ts fix(chromium): continue requests paused for the second time (#27429) 2023-10-04 11:18:06 -07:00
tsconfig.json chore: make @playwright/test depend on playwright (#26946) 2023-09-08 14:23:35 -07:00
tsconfig.node.json chore: group tests under tests/ (2) (#13082) 2022-03-25 23:09:02 -07:00
vite.config.ts chore: group tests under tests/ (2) (#13082) 2022-03-25 23:09:02 -07:00