문제

Hi we are using angulatJs with typescript. For unit testing we are using Jasmine. And to run jasmine we are using Chutzpah.

When i am trying to build project it giving me an error that

ReferenceError: Can't find variable: angular

Where i have added reference to the .spect.ts correctly.

 ///<reference path="../external/angularJS/1.0.8/angular.d.ts" />
 ///<reference path="../external/angularJS/1.0.8/angular-ui.d.ts" />
 ///<reference path="../external/angularJS/1.0.8/angular-mocks.d.ts" />
 ///<reference path="../_references.d.ts" />

But still i am getting the ReferenceError: Can't find variable: angular

Any suggestion ??

Thanks

도움이 되었습니까?

해결책

Those references are to the .d.ts file but Chutzpah needs to know where the actual implementation .js files are. You can do this using

/// <chutzpah_reference path="path/to/angular.js" >
/// <chutzpah_reference path="path/to/angular-ui.js" >
/// <chutzpah_reference path="path/to/angular-mock.js" >
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top