aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Cross2013-07-23 11:00:42 -0700
committerBrian Ford2013-08-12 16:23:38 -0700
commit64e447354e48da2bc93a4e95d5dd62b69f6a1325 (patch)
tree136fb7cc78bee6220c29c079467d38c24a45beb9
parentda1f7c762d36b646c107260f74daf3a0ab5f91f5 (diff)
downloadangular.js-64e447354e48da2bc93a4e95d5dd62b69f6a1325.tar.bz2
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.
-rw-r--r--test/testabilityPatch.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index 7d93720f..769c922f 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -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));
+};