i am trying to test html element but my test gets failed actually i want to test what text or value that element contain here is my app in jsfiddle http://ift.tt/1MMoqDP here is my controllerspec: describe('myAppCtrl', function() { var scope, controller, httpBackend;
beforeEach(module('myApp'));
beforeEach(inject(function($rootScope, $controller, $httpBackend) {
scope = $rootScope;
controller = $controller;
httpBackend = $httpBackend;
}));
it('should show the number of items in list',function() {
var elementtext = $('#test');
expect(elementtext.innerHTML()).toBe('First Angular JS App');
});
Aucun commentaire:
Enregistrer un commentaire