How do you add breakpoints to debug your tests?

0 views
Skip to first unread message

Matthias Luebken

unread,
Mar 22, 2010, 4:04:49 PM3/22/10
to jspec
Hi

I know this isn't pure TDD/BDD. But from time to time I have to run my
dom
tests through a debugger. I've written my tests with the jspec grammer
and
when I open Safaris Webinspector or Firebug, it is impossible to find
the
right test. When I try to locate the script in Safari I only see bunch
of
(program) entries and in Firefox I see a bunch of eval statements.

So how do you add breakpoints to debug your tests?

Thanks
Matthias

BTW: I am using TextMate on the Mac.

Randy Harmon

unread,
Apr 1, 2010, 11:15:58 AM4/1/10
to js...@googlegroups.com
Normally I type 'debugger' into tests, but the way Jspec uses eval, those don't get honored.  Consequently, I will sometimes put the debugger statement into the relevant portion of the application code that the test is triggering.  Sometimes that requires setting a 'debug' variable somewhere and saying if(debug) debugger.

When firebug is open, the debugger statement outside a test does work.

It would be nice if jspec did its thing in a way such that eval() in a test would be honored.

Randy

--
JSpec thanks you for your interest and support! To post simply reply
to this email.

documentation: http://jspec.info
unsubscribe: jspec+un...@googlegroups.com
group: http://groups.google.com/group/jspec

To unsubscribe from this group, send email to jspec+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

vision media [ Tj Holowaychuk ]

unread,
Apr 1, 2010, 11:28:14 AM4/1/10
to js...@googlegroups.com
I have never needed to use the debugger when running my specs...
so I dont have a good answer for this sorry guys
--
Tj Holowaychuk
Vision Media
President & Creative Lead
Reply all
Reply to author
Forward
0 new messages