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

fix(npm/react): support transpiling typescript files in support #16197

Merged
merged 11 commits into from
Apr 27, 2021

Conversation

lmiller1990
Copy link
Contributor

@lmiller1990 lmiller1990 commented Apr 26, 2021

User facing changelog

Transpile TypeScript files in cypress/support when using the react-scripts (Create React App) plugin for Component Testing.

Additional details

CRA has a "feature" where it will not transpile (or even support) importing files outside src. A common cypress idiom is to keep cypress specific code in cypress. We already have special rules supporting transpiling/importing code from fixtures and commands. Now we have it for support, too.

The important part to review is here. I just followed the existing pattern.

How has the user experience changed?

You may now use TS inside of support, for example support/index.ts.

PR Tasks

  • Have tests been added/updated?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 26, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Apr 26, 2021



Test summary

9512 0 111 3Flakiness 0


Run details

Project cypress
Status Passed
Commit 58486da
Started Apr 27, 2021 12:48 AM
Ended Apr 27, 2021 12:59 AM
Duration 10:58 💡
OS Linux Debian - 10.8
Browser Multiple

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@lmiller1990 lmiller1990 merged commit 60b217c into develop Apr 27, 2021
elevatebart added a commit that referenced this pull request May 5, 2021
* fix: transpile typescript in supportFolder for react-scripts

* lint

* lint

* lint

* lint

* update package.json deps

* Remove yarn lock

* inject dev serverg

* add circleci reporter

Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
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

Successfully merging this pull request may close these issues.

Error when running Component Testing with TS support file via react-scripts
4 participants