dev: add fast-unit test scripts excluding example tests#2746
Open
Dotims wants to merge 2 commits into
Open
Conversation
test:fast-unit and test:fast-unit-watch run unit tests while excluding apps/typegpu-docs/tests/individual-example-tests. The example-tests project is not addressable by name from the monorepo root under Vitest 4, so exclusion is done by path.
There was a problem hiding this comment.
Pull request overview
Adds new root-level Vitest scripts intended to speed up local unit-test runs by excluding the apps/typegpu-docs/tests/individual-example-tests suite, addressing issue #1638.
Changes:
- Add
test:fast-unitto run unit tests while excluding**/individual-example-tests/**. - Add
test:fast-unit-watchto run the same filtered set in watch mode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes — adds test:fast-unit and test:fast-unit-watch scripts to the root package.json that skip the example snapshot tests in apps/typegpu-docs/tests/individual-example-tests, giving a faster local unit-test loop.
- Add
test:fast-unit— runs the non-browser unit tests while excluding the example tests. - Add
test:fast-unit-watch— watch-mode equivalent of the above.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
iwoplaza
reviewed
Jul 21, 2026
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
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.

What
Adds
test:fast-unitandtest:fast-unit-watchto the rootpackage.json.They run the unit tests but exclude the example tests in
apps/typegpu-docs/tests/individual-example-tests, for a faster local loop.Closes #1638
Note on the approach
The issue suggests handling this like the browser tests (by project). On
Vitest 4, though, the inner
individual-example-testsproject defined inapps/typegpu-docs/vitest.config.mtsis not addressable from the monoreporoot: when that config is pulled in via the root
projects: ['apps/*'], itsnested
test.projectsis not re-expanded, so the example tests run under thetypegpu-docsproject and--project=!individual-example-testsis a no-op.I excluded them by path instead:
--exclude '**/individual-example-tests/**'.apps/typegpu-docshas no other node tests, so nothing else is affected.Result:
test:fast-unitruns 2508 tests across 192 files (vs 2567 / 251 withthe examples) and is noticeably faster.
Happy to instead restructure the config so the example tests become a
root-addressable project (then
--project=!individual-example-tests) if youprefer that.
Side note (out of scope for this PR)
--project=!browserin the existing scripts also looks like a no-op from theroot, and
test:browser(--project browser) errors with "No projectsmatched" when run from the root. Possibly fallout from the Vitest 3->4 upgrade.