diff --git a/content/guides/component-testing/component-test-troubleshooting.md b/content/guides/component-testing/component-test-troubleshooting.md index fb4e14d1f8..2874389c53 100644 --- a/content/guides/component-testing/component-test-troubleshooting.md +++ b/content/guides/component-testing/component-test-troubleshooting.md @@ -93,6 +93,10 @@ You can also group your Cypress tests and Jest tests inside separate folders You will need to add a `tsconfig.json` to the folder and specify the types the files inside that folder should use. +In cypress 10, you will need to exclude `cypress.config.ts`, `cypress`, +`node_modules` in `tsconfig.json`. Please see our +[Migrating to Cypress version 10.0](/guides/references/migration-guide#Clashing-types-with-Jest) + Don't forget to update your [`specPattern`](https://docs.cypress.io/guides/references/configuration#component) to include the new file location. diff --git a/content/guides/references/migration-guide.md b/content/guides/references/migration-guide.md index 766a621539..438320ea44 100644 --- a/content/guides/references/migration-guide.md +++ b/content/guides/references/migration-guide.md @@ -714,6 +714,19 @@ plugin will need to be updated to version >= 3.10 to work with Cypress 10. Using a previous version will result in an error when tests are ran with code coverage enabled. +### Clashing types with Jest + +Configuring your app with separate `tsconfig.json` to solve +[clashing types with jest](/guides/tooling/typescript-support#Clashing-types-with-Jest). +You will need to exclude `cypress.config.ts`, `cypress`, `node_modules` in your +root `tsconfig.json` file. + +```json +{ + "exclude": ["cypress.config.ts", "cypress", "node_modules"] +} +``` + ## Migrating from `cypress-file-upload` to [`.selectFile()`](/api/commands/selectfile) Selecting files with input elements or dropping them over the page is available