TypeScript configuration transpiling all `.ts` files in project?
See original GitHub issueI’m attempting to add cypress@3.0.3
and cypress-cucumber-preprocessor@1.2.2
with tsify@4.0.0
to an existing Angular 6 project. However, I am getting a TypeScript transpilation error in some code located outside of the cypress
directory when running any test, even the stock JavaScript examples provided with Cypress.
If I do not have any .feature
files or corresponding TypeScript step definitions, I get an error of the form:
Oops...we found an error preparing this test file:
...
This occurred while Cypress was compiling and bundling your test code. This is usually caused by:
A missing file or dependency
A syntax error in the file or one of its dependencies
Fix the error in your code and re-run your tests.
If I have added .feature
file & corresponding step definition, the same TypeScript error gets referenced by way of a plugin error:
Error running plugin
The following error was thrown by a plugin. We've stopped running your tests because a plugin crashed.
...
I am using the cypress/plugins/index.js
configuration provided in the README.md
. The same occurs with or without a cypress/tsconfig.json
. From testing, I suspect that the tsify
babel
plugin is either ignoring entirely or perhaps always using the root tsconfig.json
rather than the one closest to the cypress
code.
How can I configure cypress
with cypress-cucumber-preprocessor
to only transpile TypeScript code inside of the cypress
directory?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top GitHub Comments
Cool. I opened a PR to simplify the README: #92
Does using
'@cypress/browserify-preprocessor'
fix this https://github.com/TheBrainFamily/cypress-cucumber-preprocessor/issues/61?