Search Posts

Category: karma-jasmine

controller is undefined in unit test – jasmin karma

I am writing test for directive. ‘controller must be created’ is failed saying ‘Expected undefined to be defined.’ I am trying to retrieve the controller with element.controller but somehow it is not working. please suggest if I am doing something wrong here. thanks I already tried to find the solution with similar questions but that did not work. import { MyGridCtrl } from ‘../Mygrid.ctrl’; describe(‘My grid component tests’, () => { var _scope: angular.IScope; var […]