aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Minar2013-07-22 13:59:21 -0700
committerIgor Minar2013-07-22 14:01:38 -0700
commitacb6b75fe9968f0ccdb44353258c05cb747961ca (patch)
tree654ce34292215d6195274e84de90ffe1943b248c
parent683fd713c41eaf5da8bfbf53b574e0176c18c518 (diff)
downloadangular.js-acb6b75fe9968f0ccdb44353258c05cb747961ca.tar.bz2
chore(dump): remove dead code
This code is not being used any more and the test is now failing due to Karma changes. Karma used to expose window.dump but that changed recently and that's why our build is now failing. I'm removing the code and test, but we still need to figure out how to route window.dump through angular.mock.dump, but that will have to be a separate commit.
-rw-r--r--src/ngMock/angular-mocks.js20
-rw-r--r--test/ngMock/angular-mocksSpec.js5
2 files changed, 2 insertions, 23 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js
index 4afaa2ec..6e258837 100644
--- a/src/ngMock/angular-mocks.js
+++ b/src/ngMock/angular-mocks.js
@@ -800,7 +800,7 @@ angular.mock.dump = function(object) {
</pre>
*
* Now we setup the mock backend and create the test specs.
- *
+ *
<pre>
// testing controller
describe('MyController', function() {
@@ -856,7 +856,7 @@ angular.mock.dump = function(object) {
it('should send auth header', function() {
var controller = createController();
$httpBackend.flush();
-
+
$httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
// check if the header was send, if it wasn't the expectation won't
// match the request and the test will fail
@@ -1642,22 +1642,6 @@ angular.mock.clearDataCache = function() {
};
-window.jstestdriver && (function(window) {
- /**
- * Global method to output any number of objects into JSTD console. Useful for debugging.
- */
- window.dump = function() {
- var args = [];
- angular.forEach(arguments, function(arg) {
- args.push(angular.mock.dump(arg));
- });
- jstestdriver.console.log.apply(jstestdriver.console, args);
- if (window.console) {
- window.console.log.apply(window.console, args);
- }
- };
-})(window);
-
window.jasmine && (function(window) {
diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js
index 5992846d..70e42fb5 100644
--- a/test/ngMock/angular-mocksSpec.js
+++ b/test/ngMock/angular-mocksSpec.js
@@ -353,11 +353,6 @@ describe('ngMock', function() {
expect(d($rootScope)).toMatch(/Scope\(.*\): \{/);
expect(d($rootScope)).toMatch(/{"abc":"123"}/);
}));
-
-
- it('should be published on window', function(){
- expect(window.dump instanceof Function).toBe(true);
- });
});