Open mindplay-dk opened 2 years ago
I tried switching from ts-node to esbuild-runner, as you can see here.
ts-node
esbuild-runner
In this project, and I obtain paths from Error.stack, very simply, as you can see here:
Error.stack
const location = new Error().stack! .split("\n")[2] .replace(/^\s+at /, "");
For some reason, the paths in stack-traces appear to... multiply?
For example, if you run npm run test, you'll see test output like this:
npm run test
× [equal] it produces the expected test results └ /home/mindplay/workspace/funky-test/test/test/test.ts:76:10
That path is /home/mindplay/workspace/funky-test/test/test.ts:76:10, so there's a /test too many in there.
/home/mindplay/workspace/funky-test/test/test.ts:76:10
/test
As there is test coverage for that fact, you will see failing tests as well:
× "location": "/home/mindplay/workspace/funky-test/test/test/cases.ts:9:6", √ "location": "/home/mindplay/workspace/funky-test/test/cases.ts:9:6",
Something appears to be not right with the run-time path resolution of this loader?
I tried switching from
ts-node
toesbuild-runner
, as you can see here.In this project, and I obtain paths from
Error.stack
, very simply, as you can see here:For some reason, the paths in stack-traces appear to... multiply?
For example, if you run
npm run test
, you'll see test output like this:That path is
/home/mindplay/workspace/funky-test/test/test.ts:76:10
, so there's a/test
too many in there.As there is test coverage for that fact, you will see failing tests as well:
Something appears to be not right with the run-time path resolution of this loader?