Skip to content

OscarKuzniar/cypress-and-jest-typescript-example

 
 

Repository files navigation

cypress-and-jest-typescript-example renovate-app badge CircleCI

Example using Jest and Cypress with TypeScript in a single repo

If you are using Jest and Cypress types in the same project, they might conflict because both test runners use globals like expect. This project shows how to isolate Cypress TypeScript definitions from Jest TS definitions in the same project.

See the root level tsconfig.json and jest.config.js. The Cypress types are isolated from the root in the file cypress/tsconfig.json. The root tsconfig explicitly only includes libs with Jest globals (without Cypress)

Additional information

See the excellent advice on setting TypeScript for Jest and Cypress in TypeScript Deep Dive e-book by Basarat Syed

Questions or problems

If you hit a problem using Jest and Cypress in the same project, please open an issue in this repository. Include a fork of this repository that shows the problem.

License

This project is licensed under the terms of the MIT license.

About

Example using Jest and Cypress with TypeScript in a single repo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 82.2%
  • JavaScript 17.8%