diff options
| author | Jeff Cross | 2013-07-23 11:00:42 -0700 | 
|---|---|---|
| committer | Jeff Cross | 2013-07-23 11:00:58 -0700 | 
| commit | 865314495376adfcad3c81a2917a13e80dff6bce (patch) | |
| tree | 52dee3098050719910e9b53bee523afbd0b8f0c2 | |
| parent | 717f24feb43cb71538a7c07e4aa013c916640006 (diff) | |
| download | angular.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.
| -rw-r--r-- | test/testabilityPatch.js | 5 | 
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)); +}; | 
