Commit a942914
feat: Add Turborepo caching for test:dev and fix streams dev tests (#757)
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
- Add `test:dev` and `test:dev:quiet` tasks to Turborepo for cached
local testing
- `test:dev` runs with full output for debugging
- `test:dev:quiet` uses dot reporter and `--output-logs=errors-only` for
token-efficient AI workflows
- Add `passWithNoTests: true` to vitest configs for packages without
tests
- Fix @metamask/streams tests to pass in dev mode by removing
unnecessary coupling between environment choice and endoify setup
## Details
### Turborepo Caching
Both `test:dev` and `test:dev:quiet` tasks depend on `^build` and 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 results
- `yarn test:dev:quiet` - Only shows output from failing packages, uses
dot reporter
### Streams Fix
The streams vitest.config.ts was coupling two unrelated concerns:
- **Environment**: jsdom (dev) vs browser/Playwright (test)
- **Endoify**: mock (dev) vs real (test)
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](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a0a2494 commit a942914
32 files changed
Lines changed: 108 additions & 80 deletions
File tree
- packages
- brow-2-brow
- cli
- create-package
- extension
- kernel-agents-repl
- kernel-agents
- kernel-browser-runtime
- kernel-errors
- kernel-language-model-service
- kernel-platforms
- kernel-rpc-methods
- kernel-shims
- kernel-store
- kernel-test-local
- kernel-test
- kernel-ui
- kernel-utils
- logger
- nodejs-test-workers
- nodejs
- ocap-kernel
- omnium-gatherum
- remote-iterables
- repo-tools
- streams
- template-package
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
0 commit comments