Meteor by default doesn’t create source maps for production builds. You can switch to the zodern:standard-minifier-js minifier, which does generate them.
Sorry, ignore that. Adding --production was a silly suggestion I read somewhere. The issue stands without that flag, but only for client unit tests. For app tests, source maps work fine.
I already have zodern:standard-minifier-js in .meteor/package, but for some reason, no sourcemaps on client unit tests.
On the other hand, server unit tests do have sourcemaps. Any idea why that’d be happening? I’m guessing something related to how meteor or mocha interacts with headless Chrome.
Where are you not seeing the source maps? Are you opening the page in a browser and not seeing them in the dev tools? Or is it from the messages and errors logged meteortesting:browser-tests from the client tests?
The browser doesn’t automatically apply source maps. The browser’s dev tools handles it itself when showing the console logs and errors, and meteortesting:browser-tests would have to do the same.
It works on the server because Meteor overrides how the error stack trace is created to apply the source maps.