-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Expected behavior: That tests run consistently whether in coverage mode or not. Specifically that stack traces would contain the same paths. These paths are used by testing tools like snap-shot-it to locate associated snapshot files. The stack trace should contain a path to the original test file like: imports/jasmine/server/integration/autosplit.app-spec.js (confirmed with meteortesting:mocha)
Actual behavior: The filename in the stack trace running tests in coverage mode instead looks like /private/var/folders/q5/2qtj1b5n67b_q7czgc5mj8fh0000gn/T/meteor-test-run2kd6s4.yh47s/.meteor/local/build/programs/server/app/app.js
This causes the snapshot to not be able to locate it's required files in the original project directory.
The snap-shot-it package uses stacktrace-js to get the stack trace like so:
fullFilename = `${process.env.PWD}/${stackTrace.getSync()[1].fileName}`;