mardi 6 septembre 2016

element.lineClamp in directive's timeout function gived me "this.targetElement.lineClamp is not a function"

I'm using Jasmine Karma for unit testing Angularjs directives. I'm trying to test a directive that lineClamps text. The problem is when element.lineClamp(2) is being called from the directive when running the spec file, it gives me: "this.targetElement.lineClamp is not a function" Test scenario code

Directive code

Any idea where the problem could be?

Aucun commentaire:

Enregistrer un commentaire