Merge branch 'custom-object-formatters' into cof-merge-candidate

This commit is contained in:
Steve Gravrock
2020-02-11 11:44:38 -08:00
84 changed files with 3047 additions and 1017 deletions

View File

@@ -319,6 +319,20 @@ getJasmineRequireObj().interface = function(jasmine, env) {
return env.addAsyncMatchers(matchers);
};
/**
* Add a custom object formatter for the current scope of specs.
*
* _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.
* @name jasmine.addCustomObjectFormatter
* @since 3.6.0
* @function
* @param {Function} formatter - A function which takes a value to format and returns a string if it knows how to format it, and `undefined` otherwise.
* @see custom_object_formatter
*/
jasmine.addCustomObjectFormatter = function(formatter) {
return env.addCustomObjectFormatter(formatter);
};
/**
* Get the currently booted mock {Clock} for this Jasmine environment.
* @name jasmine.clock