https://github.com/cypress-io/add-cypress-custom-command-in-typescript
Testing how new Cypress commands are added in TypeScript
https://github.com/cypress-io/add-cypress-custom-command-in-typescript
cypress cypress-io example typescript
Last synced: over 1 year ago
JSON representation
Testing how new Cypress commands are added in TypeScript
- Host: GitHub
- URL: https://github.com/cypress-io/add-cypress-custom-command-in-typescript
- Owner: cypress-io
- Archived: true
- Created: 2018-01-02T22:31:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-28T03:41:36.000Z (over 2 years ago)
- Last Synced: 2024-05-09T21:30:37.019Z (about 2 years ago)
- Topics: cypress, cypress-io, example, typescript
- Language: TypeScript
- Size: 780 KB
- Stars: 89
- Watchers: 8
- Forks: 30
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/cypress-io/add-cypress-custom-command-in-typescript) [![renovate-app badge][renovate-badge]][renovate-app]
To add TypeScript support to Cypress
* `npm i -D @bahmutov/add-typescript-to-cypress`
* add [tsconfig.json](tsconfig.json)
* start using TypeScript in your [cypress/integration/spec.ts](cypress/integration/spec.ts)
* you can write [custom Cypress commands](https://on.cypress.io/custom-commands) in TypeScript, see example in [cypress/support/commands.ts](cypress/support/commands.ts) to add custom commands.
## Screenshots
* passing tests that exercise custom commands

* VSCode IntelliSense correctly shows `cy.foo()` docs

## Problems
If you hit a problem, please open an issue either in this repo or in [cypress-io/cypress](https://github.com/cypress-io/cypress) with reproducible source code. The best issues are the ones we can "git clone ...", install dependencies and run to see the problem. This ensures we can fix it quicker.
## Additional information
- [bahmutov/add-typescript-to-cypress](https://github.com/bahmutov/add-typescript-to-cypress)
- [Cypress Tooling: TypeScript](https://on.cypress.io/typescript-support)
[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg
[renovate-app]: https://renovateapp.com/