dgarlitt / karma-nyan-reporter

Nyan Cat style reporter based on the Mocha version
MIT License
169 stars 19 forks source link

Reporter omits WebPack line numbers from stack trace #15

Closed danawoodman closed 9 years ago

danawoodman commented 9 years ago

When using the Nyan reporter with WebPack + Karma the stack trace does not show the webpack line number. With the dots/progress reporters I see:

ReferenceError: Can't find variable: chrome
at /path/to/app/test/components/button-container-test.js:310:0 <-webpack:///src/lib/browser-events.js:55:4

With Nyan I see:

ReferenceError: Can't find variable: chrome
at http://localhost:9876/base/test/components/button-container-test.js?7041e150
b46e58c658019f97671c3f4701c5319b:310

Notice the missing <-webpack:///src/lib/browser-events.js:55:4 which directs me to the actual location of the error with webpack.

I've followed this guide to setup WebPack with Karma: http://nicolasgallagher.com/how-to-test-react-components-karma-webpack/

Basically I have sourcemaps turned on and am using karma-soucemap-loader.

Let me know if I can provide more info to help fix.

dgarlitt commented 9 years ago

@danawoodman A potential fix for this issue is in the latest release v0.2.2 which is available via npm now.

danawoodman commented 9 years ago

Awesome, it works, thanks! On Fri, Aug 7, 2015 at 5:47 PM Daniel Arlitt notifications@github.com wrote:

@danawoodman https://github.com/danawoodman A potential fix for this issue is in the latest release v0.2.2 which is available via npm https://www.npmjs.com/package/karma-nyan-reporter now.

— Reply to this email directly or view it on GitHub https://github.com/dgarlitt/karma-nyan-reporter/issues/15#issuecomment-128873377 .