Commit 4e5582a
committed
test: fix Vitest runner, all 13 tests passing, add tests to CI
Vitest config fixes:
- Switch from jsdom to happy-dom (jsdom 28 has ESM compat issue
with html-encoding-sniffer requiring @exodus/bytes)
- Add process.env.NODE_ENV='test' define so React exposes act()
and testing utilities instead of production build
CI pipeline:
- Add 'bun run test' step to test-frontend job in ci.yml
- Tests now run on every PR alongside build and tsc checks
Test results: 3 suites, 13 tests, all passing in 713ms
- ErrorBoundary: renders children, shows fallback on error, shows buttons
- useGraphData: null handling, orphan filtering, edges, node attrs, layout
- useDirectoryMatrix: null handling, dir grouping, cross-dir deps, cycles
Closes OPE-101 parent abf0925 commit 4e5582a
4 files changed
Lines changed: 29 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | | - | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
0 commit comments