From 1c36175820272f36795aa234593ab2d83bffc833 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Tue, 3 Oct 2023 12:38:09 -0400 Subject: [PATCH] Adding guide around types with Jest --- docs/guides/references/migration-guide.mdx | 13 +++++++++++++ docs/guides/tooling/typescript-support.mdx | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/docs/guides/references/migration-guide.mdx b/docs/guides/references/migration-guide.mdx index f9a699788a..1090208ab0 100644 --- a/docs/guides/references/migration-guide.mdx +++ b/docs/guides/references/migration-guide.mdx @@ -1501,6 +1501,19 @@ respectively. Any previous dev servers or mounting libraries from the `@cypress` namespace should be uninstalled in Cypress 10. +### Clashing Types with Jest + +You may want to consider 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"] +} +``` + ### Code Coverage Plugin The [Cypress Code Coverage](https://github.com/cypress-io/code-coverage#readme) diff --git a/docs/guides/tooling/typescript-support.mdx b/docs/guides/tooling/typescript-support.mdx index c7219630c5..b1d5b21fab 100644 --- a/docs/guides/tooling/typescript-support.mdx +++ b/docs/guides/tooling/typescript-support.mdx @@ -71,6 +71,19 @@ If that does not work, try restarting the IDE. ::: +### Clashing Types with Jest + +You may want to consider 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"] +} +``` + ### Types for Custom Commands When adding [custom commands](/api/cypress-api/custom-commands) to the `cy`