Closed ziedHamdi closed 9 months ago
im guessing this is actually thanks to sinon-chai
and that will be caused by chaijs/chai#1569
It seems like the issue is in @types/chai: "4" which is imported by the project and missing the methods
ah sorry yes, i missed that it is a typescript error
i would've thought calledWith
came from sinon-chai. i don't think chai has such a method
so maybe you need the types package for sinon-chai
? or whichever package is providing the calledWith
extension
I'll check that out. But if I remove @types/chai from node_modules, the project manages to compile (so maybe that dependency should be a devDependency to avoid these side effects?)
You are right!!!
Adding "@types/chai-as-promised" and "@types/sinon-chai" solved the issue. Thanks for pointing that out
My project has a bunch of dependencies, I cannot know what is causing the issue, but as soon as I install chai-http I start having the following errors throughout the project (on
npm run tsc
):The properties: called, calledWith, rejectedWith are not present anymore in the Assertion type.
This is my package.json dependencies