mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #2897 from cspotcode/master
Updates sinon-chai definition and tests to support loading sinon-chai as a chai plugin.
This commit is contained in:
@@ -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;
|
||||
|
||||
Vendored
+5
@@ -26,3 +26,8 @@ declare module chai {
|
||||
always: Expect;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "sinon-chai" {
|
||||
function exports(_chai: typeof chai, utils: any): void;
|
||||
export = exports;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user