angularjs - Why am I getting an exception when trying to debug my Jasmine test (they run just fine)? -
angularjs - Why am I getting an exception when trying to debug my Jasmine test (they run just fine)? -
i have unit tests very simple test angular controller. when run them, execute successfully; however, when seek debug them, exception.
i running vs 2013, angularjs 1.2, resharper 8.2, jasmine 1.3, , phantomjs 1.9.7.
here simple controller:
(function() { var app = angular.module("permutedmultiples", []); function maincontroller($scope) { $scope.answer = -1; $scope.n = 0; } app.controller("maincontroller", ["$scope", maincontroller]); })();
here simple test suite:
///<reference path="/scripts/jasmine.js"/> ///<reference path="/scripts/angular.js"/> ///<reference path="/scripts/angular-mocks.js"/> ///<reference path="/scripts/app/maincontroller.js"/> describe("main controller tests.", function () { var scope; beforeeach(module("permutedmultiples")); beforeeach(inject(function($controller, $rootscope) { scope = $rootscope.$new(); $controller("maincontroller", { $scope: scope }); })); it("answer should initialized -1", function() { expect(scope.answer).tobe(-1); }); it("n should initialized 0", function() { expect(scope.n).tobe(0); }); })
like said: both tests run fine, when seek debug them, objectdisposedexception exception.
i write tests, write code create tests pass. when test doesn't pass after have written code, able debug through code figure out problem is. can please help me figure out if i've done wrong here?
angularjs visual-studio-2013 jasmine resharper phantomjs
Comments
Post a Comment