Added the ability to associate trace information with failing specs
This is meant to aid in debugging failures, particularly intermittent failures, in cases where interactive debugging or console.log aren't suitable.
This commit is contained in:
@@ -420,4 +420,20 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
putativeSpy.calls instanceof j$.CallTracker
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Logs a message for use in debugging. If the spec fails, trace messages
|
||||
* will be included in the {@link SpecResult|result} passed to the
|
||||
* reporter's specDone method.
|
||||
*
|
||||
* This method should be called only when a spec (including any associated
|
||||
* beforeEach or afterEach functions) is running.
|
||||
* @function
|
||||
* @name jasmine.trace
|
||||
* @since 3.10.0
|
||||
* @param {String} msg - The message to log
|
||||
*/
|
||||
j$.trace = function(msg) {
|
||||
j$.getEnv().trace(msg);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user