I'm having issues moving react testing lib tests from create react app to vite:
src/Pages/WelcomePage/views/SelectUser/index.test.jsx [ src/Pages/WelcomePage/views/SelectUser/index.test.jsx ]
Error: Cannot find module 'react-dom/client'
Require stack:
- /Users/nikos/WebstormPro.../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@testing-library/react/dist/pure.js
❯ Object.<anonymous> node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@testing-library/react/dist/pure.js:35:46
Current libs in white
edit -------------- upgrading to
"react": "^18.1.0",
"react-dom": "^18.1.0",
fixed the above but now I get:
❯ resetClipboardStubOnView node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@testing-library/user-event/dist/index.mjs:320:30
318| }
319| function resetClipboardStubOnView(window) {
320| if (isClipboardStub(window.navigator.clipboard)) {
| ^
