Claude Code is trying to run selected tests only. Seems the Meteor implementation of rspack isn’t allowing grep, if it does please advise on how to achieve this, thanks!
FYI - using Mocha for testing.
UPDATE:
The background research on the Meteor rspack grep issue completed. Here's the key finding:
MOCHA_GREP + Rspack
MOCHA_GREP is not a Meteor feature — it's from the meteortesting:mocha Atmosphere package. The Meteor 3.4 docs don't mention it at all. The docs do acknowledge that rspack
testing flows are still being stabilized in the 3.4.x release cycle (Phase 5 roadmap).
The likely cause: rspack takes over bundling and the process.env.MOCHA_GREP reference in meteortesting:mocha's runtimeArgs.js is either being replaced at build time with an
empty value, or the env var isn't propagating to the rspack runtime context.
Workarounds:
1. meteor test-packages --filter "name" — Meteor's built-in filtering (but only for package tests, not app tests)
2. Remove rspack temporarily for test runs: meteor remove rspack to fall back to the traditional bundler where MOCHA_GREP works
3. Wait for Meteor 3.4.x to stabilize test flows with rspack
For now, running the full suite and filtering output (as we did) is the pragmatic approach.
FYI - I have 1,300 tests for this repo so this is a big downside that I didn’t know before switching to rspack. Might be that this is a known problem/shortcoming and I just didn’t read about it but IMO it’s something that hopefully is fixed soon. Hope the Meteor team agrees.