aboutsummaryrefslogtreecommitdiffstats
path: root/test/testabilityPatch.js
diff options
context:
space:
mode:
authorJeff Cross2013-07-23 11:00:42 -0700
committerJeff Cross2013-07-23 11:00:58 -0700
commit865314495376adfcad3c81a2917a13e80dff6bce (patch)
tree52dee3098050719910e9b53bee523afbd0b8f0c2 /test/testabilityPatch.js
parent717f24feb43cb71538a7c07e4aa013c916640006 (diff)
downloadangular.js-865314495376adfcad3c81a2917a13e80dff6bce.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.
Diffstat (limited to 'test/testabilityPatch.js')
-rw-r--r--test/testabilityPatch.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index 278631f1..5fae2817 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -283,3 +283,8 @@ function pending() {
function trace(name) {
dump(new Error(name).stack);
}
+
+var karmaDump = dump;
+window.dump = function () {
+ karmaDump(angular.mock.dump.apply(undefined, arguments));
+};