Updates sinon-chai definition and tests to support loading sinon-chai as a

chai plugin.

- usage is as follows:
    import sinonChai = require('sinon-chai');
    chai.use(sinonChai);
- Also updates the tests to compile with --noImplicitAny
This commit is contained in:
Andrew Bradley
2014-09-29 06:15:01 -04:00
parent e9ddb4f840
commit 035fea44c6
2 changed files with 13 additions and 3 deletions
+8 -3
View File
@@ -3,12 +3,17 @@
declare var expect: chai.ExpectStatic;
import chai = require('chai');
import sinonChai = require('sinon-chai');
chai.use(sinonChai);
function test() {
var spy: Function;
var anotherSpy: Function;
var context;
var match;
var context: any;
var match: any;
expect(spy).to.have.been.called;
expect(spy).to.have.been.calledOnce;
expect(spy).to.have.been.calledTwice;
+5
View File
@@ -26,3 +26,8 @@ declare module chai {
always: Expect;
}
}
declare module "sinon-chai" {
function exports(_chai: typeof chai, utils: any): void;
export = exports;
}