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

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -