ianb / doctestjs

Javascript testing made easy and explicit
http://ianb.github.io/doctestjs/
MIT License
142 stars 10 forks source link

syntax errors in tests do not manifest well #7

Closed lloyd closed 14 years ago

lloyd commented 14 years ago

consider this example code:

https://gist.github.com/729297

upon clicking the button there's no visibile output on the page, and I have to go into my debugger to figure out what's happened. It turns out the exception parsing logic in doctest.js doesn't handle this exception well:

https://github.com/ianb/doctestjs/blob/4bced7339ff97834a7561d0e6626deed70018de7/doctest.js#L387-404

This makes debugging tests more difficult than necessary.

(issue experience primarily on chromium/linux, though I can imagine it'd be much different in other environments)

ianb commented 14 years ago

This was because Chrome's .stack attribute is different, so the traceback formatting wasn't working. Should be fixed now.