computmaxer / karma-jspm

Other
74 stars 50 forks source link

source line numbers for AssertionErrors when transpiling with Babel or Traceur #52

Open edrex opened 9 years ago

edrex commented 9 years ago

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 commented 9 years ago

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

myitcv commented 9 years ago

Anyone have this working in their setup?

letmaik commented 9 years ago

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