hi there, we’re having some problems with our component tests after upgrading to RW3. This is also reproducible by creating an new project and generating a new page
Env. macOS 12.6 / M2 - NVM Node 16.17.0, yarn 3.2.3
FAIL web web/src/pages/MyPagePage/MyPagePage.test.tsx
● MyPagePage › renders successfully
Cannot find module 'headers-polyfill/lib' from 'node_modules/@mswjs/interceptors/lib/interceptors/ClientRequest/NodeClientRequest.js'
Require stack:
node_modules/@mswjs/interceptors/lib/interceptors/ClientRequest/NodeClientRequest.js
node_modules/@mswjs/interceptors/lib/interceptors/ClientRequest/http.get.js
node_modules/@mswjs/interceptors/lib/interceptors/ClientRequest/index.js
node_modules/msw/node/lib/index.js
node_modules/@redwoodjs/testing/dist/web/mockRequests.js
node_modules/@redwoodjs/testing/config/jest/web/jest.setup.js
at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:487:11)
at Object.<anonymous> (node_modules/@mswjs/interceptors/src/interceptors/ClientRequest/NodeClientRequest.ts:5:1)
at Object.<anonymous> (node_modules/@mswjs/interceptors/src/interceptors/ClientRequest/http.get.ts:3:1)
at Object.<anonymous> (node_modules/@mswjs/interceptors/src/interceptors/ClientRequest/index.ts:5:1)
at Object.<anonymous> (node_modules/msw/node/lib/index.js:5:21)
at startMSW (node_modules/@redwoodjs/testing/dist/web/mockRequests.js:37:9)
at Object.<anonymous> (node_modules/@redwoodjs/testing/config/jest/web/jest.setup.js:31:9)
also
● MyPagePage › renders successfully
TypeError: Cannot read properties of undefined (reading 'resetHandlers')
at setupRequestHandlers (node_modules/@redwoodjs/testing/dist/web/mockRequests.js:49:19)
at Object.<anonymous> (node_modules/@redwoodjs/testing/config/jest/web/jest.setup.js:36:3)
● MyPagePage › renders successfully
TypeError: restoreConsole is not a function
at Object.<anonymous> (node_modules/@testing-library/react-hooks/lib/core/console.js:45:21)
● Test suite failed to run
TypeError: Cannot read properties of undefined (reading 'close')
at closeServer (node_modules/@redwoodjs/testing/dist/web/mockRequests.js:59:19)
at Object.<anonymous> (node_modules/@redwoodjs/testing/config/jest/web/jest.setup.js:40:3)