Skip to content

Commit acb6b75

Browse files
committed
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.
1 parent 683fd71 commit acb6b75

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

src/ngMock/angular-mocks.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ angular.mock.dump = function(object) {
800800
</pre>
801801
*
802802
* Now we setup the mock backend and create the test specs.
803-
*
803+
*
804804
<pre>
805805
// testing controller
806806
describe('MyController', function() {
@@ -856,7 +856,7 @@ angular.mock.dump = function(object) {
856856
it('should send auth header', function() {
857857
var controller = createController();
858858
$httpBackend.flush();
859-
859+
860860
$httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
861861
// check if the header was send, if it wasn't the expectation won't
862862
// match the request and the test will fail
@@ -1642,22 +1642,6 @@ angular.mock.clearDataCache = function() {
16421642
};
16431643

16441644

1645-
window.jstestdriver && (function(window) {
1646-
/**
1647-
* Global method to output any number of objects into JSTD console. Useful for debugging.
1648-
*/
1649-
window.dump = function() {
1650-
var args = [];
1651-
angular.forEach(arguments, function(arg) {
1652-
args.push(angular.mock.dump(arg));
1653-
});
1654-
jstestdriver.console.log.apply(jstestdriver.console, args);
1655-
if (window.console) {
1656-
window.console.log.apply(window.console, args);
1657-
}
1658-
};
1659-
})(window);
1660-
16611645

16621646
window.jasmine && (function(window) {
16631647

test/ngMock/angular-mocksSpec.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,6 @@ describe('ngMock', function() {
353353
expect(d($rootScope)).toMatch(/Scope\(.*\): \{/);
354354
expect(d($rootScope)).toMatch(/{"abc":"123"}/);
355355
}));
356-
357-
358-
it('should be published on window', function(){
359-
expect(window.dump instanceof Function).toBe(true);
360-
});
361356
});
362357

363358

0 commit comments

Comments
 (0)