mafintosh / mafintosh/why-is-node-running
Source Map line numbers are wrong with mocha and ts-node
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.9k
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
So as the title says, when I run this package with mocha like so:
`why-is-node-running node_modules/.bin/_mocha --inspect -r ts-node/register 'src/**/*.test.ts'`
or so:
`mocha --inspect -r ts-node/register -r why-is-node-running/include 'src/**/*.test.ts'`
the output points to the wrong line in the ts source files or even the wrong file completely.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the two mocha commands in the report with ts-node/register and src/**/*.test.ts. Trace the source-map handling used by why-is-node-running and verify completion when output consistently points to the correct TypeScript file and line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, typescript
- Domain
- devtools, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100