testdouble / teenytest

A very simple, zero-config test runner for Node.js
MIT License
96 stars 14 forks source link

Line numbers don't respect sourcemaps #40

Open garybernhardt opened 5 years ago

garybernhardt commented 5 years ago

When running teenytest file.js:10, the "10" should refer to the line number in whatever the original source was. If it's been compiled from TypeScript etc., that line number will be different. Teenytest should use source maps to trace back to the original line.

Likewise for exceptions; they point to line numbers in the built code, not the original source.

searls commented 5 years ago

Cross-linking discussion in: https://github.com/testdouble/function-names-at-line/issues/1