jasmine - Testing a AngularJS directive that uses Popcorn.js -


i'm working on new project uses angularjs, 1 of goals have project it's build using tdd. i'm having issues testing directive uses popcorn.js embed video.

here link sample code

and here sample of test i'm trying run,

it('should load html5 video', function() {     var videoloadedlistener = jasmine.createspy('listener');     rootscope.$on('videoloaded', videoloadedlistener);      element = angular.element('<player></player>');     element = compile(element)(rootscope);      expect(element.find("video").length).tobe(1);     expect(videoloadedlistener).tohavebeencalled(); }); 

i'm getting error test, 'specified target player not found.' popcorn.js not being able find div insert video into.

i'm using karma both phantomjs , chrome. code seems work fine, it's test not working.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -