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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -