javascript - Why does adding a reference to jasmine.js break my ReSharper test? -


i trying use resharper run javascript unit tests using phantomjs [headless] visual studio. when include reference jasmine in file breaks test. if comment out top line works. why? test written in jasmine syntax...

/// <reference path="../jasmine/jasmine.js"/>  <-- when comment this, tests work /// <reference path="../angular-loader.js"/> /// <reference path="../angular-mocks.js"/> /// <reference path="../angular.js"/> /// <reference path="../teststuff/app.js"/>   describe('jasmineapp', function () {      var scope = {};      scope.name = '';      beforeeach(angular.mock.module('jasmineapp'));      beforeeach(angular.mock.inject(function ($rootscope, $controller) {         scope = $rootscope.$new();         $controller('jasmineappcontroller', { $scope: scope });     }));      it('name eric', inject(function () {         expect(scope.name).toequal("eric");      }));  }); 

i think that's because angular comes bundled karma default - , karma supports tests jasmine syntax out of box.

there might framework crash somewhere...

so remove inclusion of jasmine (the line you're commenting out) , you'll fine.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -