unit testing framework that can be run via debugger

109 views
Skip to first unread message

secoif

unread,
Apr 18, 2011, 8:53:17 PM4/18/11
to nod...@googlegroups.com
Looking for something with assert style tests, that also facilitates debugging/stepping through the test cases.
Currently using Expresso, but have a bug that's difficult to track down and can't seem to get expresso to play nice with a debugger and allow me to step through the code. Using either node debug/eclipse v8 debugger currently. Perhaps another debugging tool will be satisfactory?

Isaac Schlueter

unread,
Apr 18, 2011, 10:08:15 PM4/18/11
to nod...@googlegroups.com
vim $(which expresso)

Change the #! line at the top to: #!/usr/bin/env node debug
In vim, you can probably just type this: A debug<Esc>:wq

Then put a "debugger" line in your code where you want it to drop into
the debugger.

> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>

secoif

unread,
Apr 19, 2011, 2:34:26 AM4/19/11
to nod...@googlegroups.com
Ahh, thanks, that hint even allowed me to get it going in Eclipse using:

 #!/usr/bin/env node --debug-brk

I had this before but the break points in eclipse didn't work. debugger; statements work just fine for a single file at a time :D
Not perfect but it allowed me to see what was going on.

Thanks.

Reply all
Reply to author
Forward
0 new messages