Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 64e4473

Browse files
jeffbcrossbtford
authored andcommitted
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.
1 parent da1f7c7 commit 64e4473

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/testabilityPatch.js

+5
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,8 @@ function pending() {
254254
function trace(name) {
255255
dump(new Error(name).stack);
256256
}
257+
258+
var karmaDump = dump;
259+
window.dump = function () {
260+
karmaDump(angular.mock.dump.apply(undefined, arguments));
261+
};

0 commit comments

Comments
 (0)