Baby steps in Karma, don't know how to debug

229 views
Skip to first unread message

Thijs Koerselman

unread,
Mar 22, 2014, 5:23:51 PM3/22/14
to ang...@googlegroups.com
Hi, 

I just started using Karma on a Yeoman generated project for the first time, but I can't seem to debug my tests.

When I run "grunt test:unit" it fires up the browser (Chrome) and runs the tests, but it all happens very quickly and it immediately closes on the first failure. It is only up for a 1.5 sec or so. When I put debugger statements in the test spec or in the functions that they call, the breakpoints are not picked up. So I currently have no idea how to debug :-\ 

I must be missing something obvious...?

Thijs Koerselman

unread,
Mar 23, 2014, 5:07:27 AM3/23/14
to ang...@googlegroups.com
I figured it out. The singleRun setting from my karma.conf was being overruled by a setting in the Gruntfile. So while I set it to false Karma was still doing a single run. 

Now the browser doesn't get closed and I can debug. Hurray.




--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/PWTKo6_gtdo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Siaw Young Lau

unread,
Mar 24, 2014, 8:05:08 AM3/24/14
to ang...@googlegroups.com
Thanks - this helped me!
Reply all
Reply to author
Forward
0 new messages