-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component tests fail with React + TS + Vite 4.2.0 #26153
Comments
Yep, please see: #26149 (comment) Fixed in #26139. This will be in the next release, within 2 weeks. You can use Vite 4.1 in the meantime. Thanks! I'll leave this open to prevent duplicates, since a lot of people are running into this. Please be patient 🙏 |
Great, thanks! Sorry about the duplicate, wasn't sure if those were the same issue and wanted to save people some time in case they also ran into this. |
We get this with vue and vite. It fails the first run then because we have retires we get another error:
Cypress version: 12.17.2 |
Fixed in #26139. Closing as resolved. |
Current behavior
All component tests seem to fail when using React + TS + Vite 4.2.0 (4.1.4 is fine) if the mount command in
cypress/support/component.ts
is defined.A generic error message is thrown:
If cypress/support/component.ts is modified to comment out the custom mount comment (
Cypress.Commands.add('mount', mount)
), then the issue does not occur. (Simple tests without using mount() can pass.) With the mount command, all tests error.Desired behavior
Component tests using mount ideally should work with Vite 4.2.0
Test code to reproduce
See: https://github.com/ae9is/cypress-component-testing-apps
This is just a fork of the React + Vite + TS component testing example app https://github.com/cypress-io/cypress-component-testing-apps/tree/main/react-vite-ts modified to bump Cypress to 12.8.1 and Vite to 4.2.0.
Cypress Version
12.8.1
Node version
18.12.1
Operating System
Ubuntu 22.04
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: