Skip to content
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

v10.4.0 Component test React 18 warnings with mid sized apps #23172

Closed
muratkeremozcan opened this issue Aug 6, 2022 · 1 comment
Closed

Comments

@muratkeremozcan
Copy link

Current behavior

In a simple repo, like a fresh CRA, or small a-la-carte components as in 330+ cypress-react-component-test-examples v10.4.0 works as intented; there are no React 18 warnings in the console.

In mid sized or larger apps the React 18 console warnings may still persist.

Here are 2 apps where the issue is observed. Install and run any component test and view the console.

Repo 1: Kent Dodds' Epic React final app, with Cypress e2e and component tests:

git clone https://github.com/muratkeremozcan/bookshelf.git
cd bookshelf
npm i
npm run cy:open-ct

Repo 2: React Hooks in Action book with Cypress e2e and component tests

git clone https://github.com/muratkeremozcan/react-hooks-in-action-with-cypress.git
cd react-hooks-in-action-with-cypress
yarn 
yarn cy:open-ct

clear Cypress cache, remove node_modules, clear npm / yarn cache to ensure clean installs

image

Desired behavior

Regardless of the app size, there are no React 18 console warnings and we can use new React hooks in the tests.

Test code to reproduce

Linked above.

Cypress Version

10.4.0

Other

No response

@nagash77
Copy link
Contributor

nagash77 commented Aug 8, 2022

Closing as a duplicate of #23169

@nagash77 nagash77 closed this as completed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants