0

설정시 I이 guide 다음 각 제어부 시험을 설정하려고없는 다음과 같이 코드 :모듈이 각 컨트롤러 검사

describe('ProfileController', function() { 
// load haloApp module 
beforeEach(module('haloApp')); 

it("should have notify_changed in scope", inject(function($controller) { 
    var scope= {}, 
    ctrl = $controller('ProfileController', {$scope:scope});// inject controller 
    // expect(ProfileController).not.toBeDefined(); 
    expect(scope.notify_changed).toBe(false); 
})); 

}); 나는이 코드 전에 각 파일을 요구 한

ReferenceError: module is not defined 

:

나는 자스민이 테스트 케이스를 실행

, 그것은 다음과 같은 오류를보고합니다. 내가 누락 된 것이 있습니까?

+0

너는 angular-mocks.js를 포함하고 있습니까? – dnc253

+0

컨트롤러의 코드를 최소한 구현에 포함 할 수 있습니까? – Brocco

답변

관련 문제