generated from MetaMask/metamask-module-template
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Add Turborepo caching for test:dev and fix streams dev tests #757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add test:dev task to turbo.json with ^build dependency - Update root test:dev script to use turbo with --output-logs=errors-only - Add passWithNoTests to vitest configs for packages without tests Co-Authored-By: Claude <noreply@anthropic.com>
Remove unnecessary coupling between environment choice (jsdom vs browser) and endoify setup (mock vs real). Use real endoify.js in both dev and prod modes, only varying the environment. This fixes Object.isFrozen() assertions that were failing in dev mode due to mock-endoify's no-op harden() implementation. Co-Authored-By: Claude <noreply@anthropic.com>
- Remove --output-logs=errors-only from default test:dev script - Add 'Running tests' section to README documenting test commands - Document how to suppress output with --output-logs=errors-only flag Co-Authored-By: Claude <noreply@anthropic.com>
dfdbeb5 to
548fca0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
sirtimid
previously approved these changes
Jan 16, 2026
Contributor
sirtimid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds a test:dev:quiet script across all packages that uses the dot reporter for compact output. The root script also uses turbo's --output-logs=errors-only flag to only show output from failing tasks. This is useful for AI-assisted workflows where token efficiency matters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
grypez
approved these changes
Jan 16, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Running all of the unit tests is sloooow. By using
turbo, like we do for builds, it can be much faster. Since it kind of sucks to not get any output while waiting for tests to pass, also moves the "quiet" mode to its own script. This should be used with agents for possible context savings.Summary
test:devandtest:dev:quiettasks to Turborepo for cached local testingtest:devruns with full output for debuggingtest:dev:quietuses dot reporter and--output-logs=errors-onlyfor token-efficient AI workflowspassWithNoTests: trueto vitest configs for packages without testsDetails
Turborepo Caching
Both
test:devandtest:dev:quiettasks depend on^buildand enable caching of per-package tests. Subsequent runs without code changes will hit the cache.Test commands:
yarn test:dev- Full turbo output with verbose test resultsyarn test:dev:quiet- Only shows output from failing packages, uses dot reporterStreams Fix
The streams vitest.config.ts was coupling two unrelated concerns:
The mock-endoify setup doesn't actually freeze objects, causing
Object.isFrozen()assertions to fail in dev mode. By using real endoify.js and browser/Playwright in both modes, tests now pass consistently.🤖 Generated with Claude Code