0

I'm making an angular app and am running end-to-end tests on them. I need to run a $httpBackend instance for some of my tests, but I can't figure out how to do it. Currently my code looks like

myApp = angular.module('myApp', []);
myApp.controller('Controller', function () {
    $http.post('/register/reg').success(function () console.log('yay'););
\\ things...
myTestingApp = angular.module('myTestingApp', ['myApp', 'ngMockE2E']);
myTestingApp.run(function ($httpBackend) {
    $httpBackend.whenPOST('/\/register\/reg.*/').respond(200);
});

then I just navigate to runner.html and run my tests. All of my other tests are seen by Karma, but this is not. What's going on?

Jason B
  • 7,097
  • 8
  • 38
  • 49
  • Is it working under runner.html? If not, are you bootstrapping your application with the myTestingApp module, i.e. ng-app="myTestingApp"? – Karen Zilles Jun 12 '13 at 17:15
  • @KarlZilles I'm bootstrapping, yes. It's also running on runner.html though. – Jason B Jun 12 '13 at 19:21

0 Answers0