According to the Jasmine documentation , the Spy object has a withArgs () method.

spyOn(someObj, 'func').withArgs(1, 2, 3).and.returnValue(42); 

I can not find this method in the version adapted for TypeScript. I created the Angular project using angular-cli (ng new), the setup for working with Jasmine is provided out of the box. When trying to call withArgs () method, Visual Code writes that this method does not exist in the Spy type ...

    1 answer 1

    You are viewing the documentation for the third version of Jasmine. In angular-cli, the second is used.

    The documentation for the second version can be found here , and the taipings for it are available here .