-
Notifications
You must be signed in to change notification settings - Fork 47
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
error while importing chai-spies #45
Comments
@jalalat is that just a warning from the TypeScript compiler, or something actually don't work? |
Hi @dotansimha I found out next day that it is compiling and working fine. So definitely an issue with typings. I installed everything correctly. I am able to proceed but it bothers me to see lot of TypeScript errors in my testing scripts. i resolved the first error using: Second and many others similar TS errors I am not able to find the solution. Is there any fix for that. I searched a lot on internet and i have got the right typings. As a beginner i like when i type . i can see the functions/variables available. Not an issue if there is no fix. Really appreciate your help and time that you got back to me. |
@jalalat usually it's just typings issue. Also, which IDE do you use? |
Hi @dotansimha there are more typing errors with new version of boilerplate with describe, beforeEach, it etc. My initial thoughts were may be these errors are there due to not importing @types in typings.d.ts so i inserted these 2 lines in typings.d.ts:
Still getting all errors related to describe, beforeEach, it etc. I noticed another Typings error with latest boilerplate. If you go deep upto 3 levels it complains example: @angular/core/testing, @angular/platform-browser-dynamic/testing |
My project files are as below (not based on latest boilerplate): typings.json
index.d.ts:
package.json:
|
Still the same errors. Sorry @dotansimha . |
@jalalat , do you use the latest boilerplate, and then run |
@dotansimha yes same steps. As you know these are not code errors rather Typings errors in code editors (Visual studio code and Sublime Text). I will try a new laptop in the evening and will let you know. |
With latest WebStorm - everything works great and detected correctly, without any lint errors. |
you are right. It works on WebStorm. I got a wonderful opportunity to try various different editors like Sublime, Visual code, Atom and now WebStorm :) |
However i could not make all chai-spies methods to work in this boilerplate like: |
Can you share the full code you are trying to run with the Spy? maybe I missed some methods in the Typings. |
Hi @dotansimha, thanks a lot for your help. Very much appreciate your time. I was just trying chai-spies before i could start using it in my code fully. I was testing the examples provided here: https://github.com/chaijs/chai-spies |
@jalalat please refer to |
I got the following error: [ts] Module ''chai-spies'' resolves to a non-module entity and cannot be imported using this construct.
chai.spy() - [ts] Property 'spy' does not exist on type 'ChaiStatic'.
Please help. Thanks.
The text was updated successfully, but these errors were encountered: