line number is mismatch when use console.log
See original GitHub issuethank you for great tool! i use console.log in test code. but line number mismatch. i created test project. here https://github.com/m0a-mystudy/typescript/blob/master/jest-line-number/line-number.test.ts
out put is here
FAIL ./line-number.test.ts
● line number test
SyntaxError: test error line:3
at Suite.<anonymous> (line-number.test.ts:3:14)
at Object.<anonymous> (line-number.test.ts:2:5)
at Promise (<anonymous>)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
● line number test2
SyntaxError: test error line:10
at Suite.<anonymous> (line-number.test.ts:10:14)
at Object.<anonymous> (line-number.test.ts:9:5)
at Promise (<anonymous>)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
✕ line number test (115ms)
✕ line number test2 (17ms)
✓ line number test4 (1ms)
Test Suites: 1 failed, 1 total
Tests: 2 failed, 1 passed, 3 total
Snapshots: 0 total
Time: 1.462s, estimated 2s
Ran all test suites.
console.log line-number.test.ts:14
hello line:17
output console.log line-number.test.ts:14
line number mismatch. why?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Why does console.log give the line number but console.error ...
The line number is showing as index.js:1 because your source has probably been put through a preprocessor and by the time the browser...
Read more >Exception stack trace source map line numbers mismatch
component.ts . This means that sourcemap is processed incorrectly on our side, i.e. kibana/apm-server. There might be a bug in our sourcemap ...
Read more >console.log with line numbers | Kai Hao
So lots of things is happening here, in short, the basic idea is that we can get the line number through stack trace...
Read more >Error.prototype.lineNumber - JavaScript - MDN Web Docs
The lineNumber data property of an Error instance contains the line number in the file that raised this error.
Read more >Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK. After updating the AWS CDK, the AWS CDK Toolkit (CLI)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s definitely a good idea. Maybe source-map-support would be interested?
Closing as there’s nothing we can do about this in ts-jest