diff --git a/chai/chai-tests.ts b/chai/chai-tests.ts index 8a09c3f42..b559c515d 100644 --- a/chai/chai-tests.ts +++ b/chai/chai-tests.ts @@ -688,6 +688,12 @@ function _throw() { }, "blah: expected [Function] to throw error including 'hello' but got 'testing'"); } +function use(){ + chai.use(function (_chai, utils) { + _chai.can.use.any(); + }); +} + function respondTo() { function Foo() {}; var bar = {}; diff --git a/chai/chai.d.ts b/chai/chai.d.ts index 9d649a17c..9fc93a667 100644 --- a/chai/chai.d.ts +++ b/chai/chai.d.ts @@ -8,6 +8,9 @@ declare module chai { function expect(target: any): Expect; + // Provides a way to extend the internals of Chai + function use(fn: (chai: any, utils: any) => void); + interface ExpectStatic { (target: any): Expect; }