Add custom async matchers

This commit is contained in:
Tony Brix
2019-07-08 15:13:06 -05:00
committed by Steve Gravrock
parent 008b80adc5
commit f77ee32c56
18 changed files with 876 additions and 49 deletions

View File

@@ -302,6 +302,20 @@ getJasmineRequireObj().interface = function(jasmine, env) {
return env.addMatchers(matchers);
};
/**
* Add custom async matchers for the current scope of specs.
*
* _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.
* @name jasmine.addMatchers
* @since 3.5.0
* @function
* @param {Object} matchers - Keys from this object will be the new async matcher names.
* @see custom_matcher
*/
jasmine.addAsyncMatchers = function(matchers) {
return env.addAsyncMatchers(matchers);
};
/**
* Get the currently booted mock {Clock} for this Jasmine environment.
* @name jasmine.clock