karma-jspm icon indicating copy to clipboard operation
karma-jspm copied to clipboard

source line numbers for AssertionErrors when transpiling with Babel or Traceur

Open edrex opened this issue 9 years ago • 3 comments

When an AssertionError occurs in a transpiled test, the report looks like this:

AssertionError: expected 'Hello, fooo.' to equal 'Hello, foo.'
    at Context.eval (base/test/hello.spec.js!eval:23:44)

Ideally it would show the line in the source file, like base/test/hello.spec.js:11:44

I'm not sure what projects would need changes to plumb this through, but IMO this ought to work out of the box. Opening an issue here to track upstreams.

Fairly extensive discussion at https://github.com/babel/karma-babel-preprocessor/issues/4

edrex avatar May 11 '15 21:05 edrex

https://github.com/tschaub/karma-source-map-support

edrex avatar May 11 '15 21:05 edrex

Anyone have this working in their setup?

myitcv avatar Jul 08 '15 13:07 myitcv

Doesn't change anything for me, in fact produces more errors but the stacktraces are the same.

letmaik avatar Aug 26 '15 16:08 letmaik