How do I use Sinon with Typescript?
Sinon can create a stub based on a constructor quite easily if, instead of mock, you use the createStubInstance method. An example using mocha, chai, sinon and sinon-chai, could look like this: import * as sinon from ‘sinon’; import * as chai from ‘chai’; // … imports for the classes under test const expect = … Read more