Tests
How ogygia is tested
Every number here comes from the CI run that built ogygia 0.13.1. Tests run in real browsers against real builds, and every bug fix starts with a test that failed first.
Version 0.13.1
4b18f465 End-to-end suites are not part of this report yet. Their counts start with a later release.
Exactly what is counted
non-blank lines of test code across the repo (*.test.ts, *.test-d.ts, *.spec.ts, and the .ts helpers in test/ and e2e/ folders; no fixtures, fixture apps, stubs or benches), over non-blank lines of packages/*/src (no .d.ts or generated files)By kind
- 3,773Unit
- 638Browser
- 0End to end
- 0Type tests
- 7Lint rules
- 167Regression tests, each citing an issue
- 23Seeded race simulations
- 165Step-count benches
- 0Failing
By browser engine
| Engine | Pass | Fail | Skip | Share |
|---|---|---|---|---|
| Chromium | 643 | 0 | 0 | |
| Firefox | 640 | 0 | 3 | |
| WebKit | 639 | 0 | 4 |
Coverage
- 65.9%Lines
- 56.8%Branches
- 59.5%Functions
- 63.0%Statements
By package
| Package | Tests | Lines | Branches | Functions | Statements | Test : source | Failing |
|---|---|---|---|---|---|---|---|
@ogygia/cli | 43 | 39.8% | 40.1% | 45.7% | 40.4% | 0.32 | 0 |
@ogygia/content | 466 | 77.0% | 62.7% | 71.4% | 73.1% | 0.47 | 0 |
@ogygia/core | 2,264 | 73.3% | 60.8% | 73.3% | 70.6% | 0.62 | 0 |
@ogygia/devtools | 749 | 54.9% | 50.1% | 40.1% | 51.6% | 0.35 | 0 |
@ogygia/federation | 65 | 75.8% | 62.5% | 78.6% | 71.8% | 1.14 | 0 |
@ogygia/flags | 44 | 88.0% | 74.7% | 86.4% | 87.4% | 0.79 | 0 |
@ogygia/machine | 627 | 96.8% | 95.9% | 91.4% | 96.3% | 1.59 | 0 |
@ogygia/postrender | 80 | 89.4% | 72.9% | 83.7% | 87.5% | 1.24 | 0 |
@ogygia/router | 50 | 70.4% | 52.5% | 69.3% | 67.7% | 0.51 | 0 |
@ogygia/testing | 27 | 79.8% | 70.7% | 71.5% | 78.6% | 0.81 | 0 |
@ogygia/tooling | 3 | 16.2% | 13.4% | 18.1% | 16.5% | 0.09 | 0 |
How the testing works
Real browsers, real builds
Browser tests run in Chromium, Firefox and WebKit through Vitest browser mode. End-to-end tests build real fixture apps and drive them with Playwright. Nothing runs against a fake DOM when a real one can answer.
Races found by seeded simulation
Code that can race runs under a seeded scheduler that tries many orderings. Each ordering that breaks something becomes a test with its seed, so the same race is checked on every run.
Every bug is proved first
A fix lands as two commits: first a test that fails on the old code, then the fix. The test says the behavior in plain words and cites its issue. Those are the regression tests counted above.
Rules, not comments
A sentence like "this must never happen" is written as something that fails out loud: a runtime rule checked at the end of every end-to-end test, a type, a lint rule or a test. Lint rules have their own tests.
Speed is counted, not timed
Hot paths have benches that count exact steps instead of timing them, so a result does not depend on the machine. A new function on a hot path needs a bench.
Size has a budget
The JavaScript a page boots with is measured on every pull request against its base. Growth over half a percent has to say why before it can land.