-
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
Incorrect column in stack trace with original file #3324
Comments
Caused by https://github.com/karma-runner/karma/blob/v4.1.0/lib/reporter.js#L63 where 1-based column is passed to |
johnjbarton
pushed a commit
that referenced
this issue
Jun 17, 2019
Columns in original stack are 1-based, but SourceMapConsumer.prototype.originalPositionFor(generatedPosition) accepts 0-based column and returns 0-based column too. This change converts columns from 1-based to 0-based forth and back. Closes #3324
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behaviour
Stack trace contains locations with 1-based line and 1-based column.
Actual behaviour
Stack trace contains locations with 1-based line and 0-based column.
Environment Details
karma --version
): 4.1.0karma.config.js
file: see the projectSteps to reproduce the behaviour
npm test
The location in the original file (
utils.spec.js:3:4
) points to the correct 1-based line, but has wrong 1-based column (in fact it's 0-based column). Since lines and columns in stack traces are expected to be both 1-based, it should beutils.spec.js:3:5
.Please note that the location in the transpiled file (
index.js:72:5
) has correct 1-based column.The text was updated successfully, but these errors were encountered: