fix(dump): Prevented window.dump from being overridden by karma-jasmine.

In commit 6820322db562382fac903be35831275948825317 of Karma-Jasmine, the
dependency on angular.dump was removed. This caused two undesirable side
effects in the angular.js project. 1) Tests for presence of mock dump were failing,
and 2) the default window.dump was not outputting valuable angular-aware info. This
simple fix adds window.dump in testabilityPatch, to preprocess dumped input prior
to passing it to the global dump method.
This commit is contained in:
Jeff Cross 2013-07-23 11:00:42 -07:00 committed by Brian Ford
parent da1f7c762d
commit 64e447354e

View file

@ -254,3 +254,8 @@ function pending() {
function trace(name) {
dump(new Error(name).stack);
}
var karmaDump = dump;
window.dump = function () {
karmaDump(angular.mock.dump.apply(undefined, arguments));
};