-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Karma 2 no longer correctly reports the original error stack when using source maps #2930
Closed
doberkofler opened this issue
Feb 11, 2018
· 3 comments
· Fixed by karronoli/redpen#10 · May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Closed
Karma 2 no longer correctly reports the original error stack when using source maps #2930
doberkofler opened this issue
Feb 11, 2018
· 3 comments
· Fixed by karronoli/redpen#10 · May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Comments
doberkofler
referenced
this issue
Feb 11, 2018
Handle urlRoot in paths if rulRoot specified Closes #2897
This was referenced Feb 12, 2018
I'm having exactly the same problem after upgrading to karma 2.0 and #2931 fixed the problem for me. What prevents it to be merged? |
I confirm this issue. Here I prepared minimal reproduction. To reproduce:
then
|
Can confirm that reverting to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
When reporting an error and source maps are available the error stack should point to the original source line and column. The mocha-reporter shows this by using a format like in the following example:
(webpack:///test/unittest/frontend/ods/convert--test.js:43:9 <- temp/karma_unittests/convert--test.js:712:10)
Actual behavior
Up to Karma 1.7 this worked as expected but starting with Karma 2.0 the commit made a change in the definition of
URL_REGEXP
that causes the reporter to no longer recognize the lines in the error stack.In the file
lib/reporter.js
when buildingURL_REGEXP
theurlRoot + '\\/?'
is now added before the(base/|absolute)
and becauseurlRoot
is always automatically post fixed with/
the resulting regular expression now expects the url always to start with/base
causing the matching to fail and to no longer correctly report the original file, line and column of the error stack.Environment Details
karma --version
): 2.0.0karma.config.js
fileSteps to reproduce the behavior
The text was updated successfully, but these errors were encountered: