Testing TypeScript and AngularJS in Visual Studio with Jasmine and Chutzpah - can't find variable: angular -


i'm trying test typescript , angularjs code jasmine in visual studio chutzpah. test running correctly in karma, realy chutzpah's ui.

my controllerspecs.ts:

/// <chutzpah_reference path="../scripts/angular.js" /> /// <chutzpah_reference path="../scripts/angular-mocks.js" /> /// <chutzpah_reference path="../scripts/angular-route.js" /> /// <chutzpah_reference path="../scripts/angular-resource.js" /> /// <chutzpah_reference path="../scripts/angular-local-storage.js" /> /// <chutzpah_reference path="../controllers/menucontroller.js" /> /// <chutzpah_reference path="../app/app.js" /> /// <chutzpah_reference path="../references.js" /> /// <reference path="../references.ts" />  describe('controller specs', () => {  describe('menu controller specs', () => {     var menuctrl, scope;      beforeeach(angular.mock.module('typewritingapp'));      beforeeach(() => inject(($rootscope) => {          scope = $rootscope.$new();         menuctrl = new app.menuctrl(scope);     }));      it('should true', () => {         expect(true).tobe(true);     }); });  }); 

my app.ts:

module app { var typewritingapp: ng.imodule = angular.module("typewritingapp", [])     .controller("menuctrl", ["$scope", menuctrl]) } 

my menucontroller.ts:

module app {  export class menuctrl {     constructor($scope: any) {         $scope.pagetitle = "menu";     } } } 

if change angular.mock.module part module in test (and need modify angular-mocks.d.ts declare module) receive same error doesn't find variable: module.

i had wrong karma config file , after has started work forgot update chutzpah.json fault. @matthewmanela


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -