-
Notifications
You must be signed in to change notification settings - Fork 9
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
cypress-localstorage-commands breaks Jest typings #140
Comments
Please, could you attach your |
|
I understand from the description that you are receiving the error in your unit tests files, when you import the |
Exactly! |
Then I suspect that the problem could be related to your Anyway, I have already created a branch (bug-140-jest-typings) for trying to reproduce the bug, but, before adding all of the dependencies, fake Jest tests, etc. Could you make some little tests for me?
|
Could be. Though this is an old project (+2 years in development) and this is the first library which has caused such problems with our current TS configuration. Perhaps I should still investigate this issue some more in our end anyways. Thanks for the fix suggestions! Unfortunately neither of them fixed the issue. 😕 |
Which version of typescript are you using? |
3.7.5! |
This was actually related to this issue: cypress-io/cypress#1087 I guess when doing My fix was adding my src-folder (which contains all my source code and not cypress tests) to the
|
Nice to hear that!, thank you very much for the info @f4irline |
Describe the bug
So we're using cypress-localstorage-commands in our Angular 2 (9.1.0) project. We're using Jest for unit testing, and cypress-localstorage-commands seems to break the typings that Jest uses.
I have a separate tsconfig for cypress tests and for unit tests. For cypress the path is
project-root/cypress/tsconfig.json
. Path for unit tests tsconfig isproject-root/src/tsconfig.spec.json
.I have imported
![image](https://user-images.githubusercontent.com/31544493/90226769-29cd6a80-de1c-11ea-82e1-29ecf990174e.png)
cypress-localstorage-commands
inproject-root/cypress/support/index.ts
. As soon as I remove the import row, the error above disappears:When I add the import row back, it appears again.
We're using TypeScript with Cypress as well.
To Reproduce
Import
cypress-localstorage-commands
as documented in a TypeScript project which uses Jest, and Cypress with Typescript.Expected behavior
It should use Jest typings.
** Operating system, Node.js an npm versions, or browser version (please complete the following information):**
The text was updated successfully, but these errors were encountered: