This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #32
Problem
Cypress does not fully support TypeScript out-of-the-box (cypress-io/cypress#1859). Currently Cypress accepts
.ts
files and the schematic already sets up everything for the IDE (like VSCode) to work. However, TypeScript itself cannot be used during executing because it is not transpiled by default.Solution
Add TypeScript preprocessor like proposed in Cypress docs to the schematic by default (https://docs.cypress.io/guides/tooling/typescript-support.html#Transpiling-TypeScript-test-files).
Steps taken
Based on the already prepared solution from Gleb @ Cypress (https://github.com/bahmutov/add-typescript-to-cypress):
cypress/tsconfig
(@anthonymjones Not really sure whether we actually need thetypes
andtarget
like before. As Gleb himself doesn't add them, I suppose we can just remove them)@cypress/webpack-preprocessor
(This dependency was already listed by the schematic)spec.ts
to show everyone that TypeScript actually works (not only the.ts
ending)