Re: [AngularJS] pointers on how to test directives
37 views
Skip to first unread message
Pawel Kozlowski
unread,
Oct 3, 2012, 3:16:15 PM10/3/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
The very good place to look for directives tests examples is ...
AngularJS source code since a large portion of the entire code-base
consists of directives and all those directives are well tested.
I recognize that browsing through the angular's code base might be
intimidating at first so fortunately there is this GithHub repo:
https://github.com/vojtajina/ng-directive-testing with an excellent example of directive testing (bootstrap's tabs). The
repo was prepared for a meetup
(https://twitter.com/vojtajina/status/245792989878841344) so I hope
that the video records from this meetup will be available soon :-)
Cheers,
Pawel
On Tue, Oct 2, 2012 at 3:16 AM, Jen Carlile <j...@vannevartech.com> wrote:
> With the help of this excellent article I wrote my first directive -- a
> reusable graph widget using D3.
> While it's working in my app, I am having a hard time figuring out how to
> write tests for it. The angular seed app has one example of testing a
> directive, but I'm having a difficult time applying the example to my
> situation.
>
> Can anyone point me towards resources or examples of unit testing
> directives? or provide any general words of wisdom? Any pointers are
> appreciated.
>
> Here is a jsfiddle with the directive: http://jsfiddle.net/jcarlile/naxns/ > I'm using Jasmine for unit testing and haven't yet setup e2e testing
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to
> angular+u...@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular?hl=en.
>
>