Merge pull request #8112 from aleung/chai

chai: enable chain style calling to use()
This commit is contained in:
Masahiro Wakame
2016-02-17 21:09:48 +09:00
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -1097,6 +1097,12 @@ function use() {
chai.use((_chai) => {
_chai.can.use.any();
});
// chain style: use mulptile plug-ins
let expect = chai
.use((_chai, util) => {})
.use((_chai, util) => {})
.expect;
}
class Klass {
+1 -1
View File
@@ -17,7 +17,7 @@ declare module Chai {
/**
* Provides a way to extend the internals of Chai
*/
use(fn: (chai: any, utils: any) => void): any;
use(fn: (chai: any, utils: any) => void): ChaiStatic;
assert: AssertStatic;
config: Config;
AssertionError: typeof AssertionError;