From a2afff965d1e93519dcecd9f90a3d36fe5fe104a Mon Sep 17 00:00:00 2001 From: bruce Date: Thu, 30 Jun 2022 00:53:46 +0800 Subject: [PATCH 1/3] docs: update clashing types with jest answer --- .../component-test-troubleshooting.md | 4 ++++ content/guides/references/migration-guide.md | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/content/guides/component-testing/component-test-troubleshooting.md b/content/guides/component-testing/component-test-troubleshooting.md index 2e65e94c02..b7194c4ffe 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` 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 ce02524f5c..502e253cbf 100644 --- a/content/guides/references/migration-guide.md +++ b/content/guides/references/migration-guide.md @@ -714,6 +714,18 @@ 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` in your root `tsconfig.json` file. + +```json +{ + "exclude": ["cypress.config.ts"] +} +``` + ## Migrating from `cypress-file-upload` to [`.selectFile()`](/api/commands/selectfile) Selecting files with input elements or dropping them over the page is available From 563f5ec34295e2e858b0598449ac7a151d8925d0 Mon Sep 17 00:00:00 2001 From: bruce Date: Thu, 30 Jun 2022 01:15:32 +0800 Subject: [PATCH 2/3] fix: lint markdown --- content/_changelogs/10.3.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/_changelogs/10.3.0.md b/content/_changelogs/10.3.0.md index 80ea2e77c3..072f8044bf 100644 --- a/content/_changelogs/10.3.0.md +++ b/content/_changelogs/10.3.0.md @@ -23,8 +23,8 @@ _Released 6/28/2022_ fixed various issues with cookies when testing across multiple origins. Fixed [#21363](https://github.com/cypress-io/cypress/issues/21363) and [#20685](https://github.com/cypress-io/cypress/issues/20685). -- Updated Cypress to use posix paths to fix an issue on - Windows when a project required `node-ts`. Fixes +- Updated Cypress to use posix paths to fix an issue on Windows when a project + required `node-ts`. Fixes [#22544](https://github.com/cypress-io/cypress/issues/22544) and [#22297](https://github.com/cypress-io/cypress/issues/22297). - Fixed a 9.x to 10.x migration bug where the migration tool would hang without From 7174d9e4aac220fccbcb0a3a38daf77815789201 Mon Sep 17 00:00:00 2001 From: bruce Date: Tue, 30 Aug 2022 11:25:37 +0800 Subject: [PATCH 3/3] feat: update exclude options --- .../component-testing/component-test-troubleshooting.md | 4 ++-- content/guides/references/migration-guide.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/content/guides/component-testing/component-test-troubleshooting.md b/content/guides/component-testing/component-test-troubleshooting.md index 70afe53c7b..2874389c53 100644 --- a/content/guides/component-testing/component-test-troubleshooting.md +++ b/content/guides/component-testing/component-test-troubleshooting.md @@ -93,8 +93,8 @@ 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` in `tsconfig.json`. -Please see our +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 diff --git a/content/guides/references/migration-guide.md b/content/guides/references/migration-guide.md index 783955f629..438320ea44 100644 --- a/content/guides/references/migration-guide.md +++ b/content/guides/references/migration-guide.md @@ -718,11 +718,12 @@ enabled. 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` in your root `tsconfig.json` file. +You will need to exclude `cypress.config.ts`, `cypress`, `node_modules` in your +root `tsconfig.json` file. ```json { - "exclude": ["cypress.config.ts"] + "exclude": ["cypress.config.ts", "cypress", "node_modules"] } ```