cljs.test file-and-line detection is not useful in browser testing
Description fields
Description
cljs.test reports using do-report, which adds file and line information computed from javascript stack traces. In chrome at least, these stack traces are not useful:
"Error
at http://localhost:3449/js/cljs/test.js:261:69
at cljs$test$do_report (http://localhost:3449/js/cljs/test.js:268:3)
at http://localhost:3449/js/test/test_tests.js:491:21
at test.test_tests.test_has_fails.cljs$lang$test (http://localhost:3449/js/test/test_tests.js:502:4)
at http://localhost:3449/js/cljs/test.js:384:42
at http://localhost:3449/js/cljs/test.js:387:4
at cljs$test$run_block (http://localhost:3449/js/cljs/test.js:320:13)
..."
The `file-and-line` stack trace parser doesn't parse this correctly, resulting in a message like this:
FAIL in (test-function) (at http:384:42)
Note the lack of a useful file/namespace reference, and that the line number refers to the compiled javascript rather than the source clojurescript.
cljs.test reports using do-report, which adds file and line information computed from javascript stack traces. In chrome at least, these stack traces are not useful:
"Error at http://localhost:3449/js/cljs/test.js:261:69 at cljs$test$do_report (http://localhost:3449/js/cljs/test.js:268:3) at http://localhost:3449/js/test/test_tests.js:491:21 at test.test_tests.test_has_fails.cljs$lang$test (http://localhost:3449/js/test/test_tests.js:502:4) at http://localhost:3449/js/cljs/test.js:384:42 at http://localhost:3449/js/cljs/test.js:387:4 at cljs$test$run_block (http://localhost:3449/js/cljs/test.js:320:13) ..."
The `file-and-line` stack trace parser doesn't parse this correctly, resulting in a message like this:
FAIL in (test-function) (at http:384:42)
Note the lack of a useful file/namespace reference, and that the line number refers to the compiled javascript rather than the source clojurescript.