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
commit 4b18f465

End-to-end suites are not part of this report yet. Their counts start with a later release.

4,418 tests in this release
0.64× lines of test for each line of source (96,705 to 151,281) Only real test code counts: test files and their helpers, not fixtures, sample apps or benches. Blank lines are left out on both sides.
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)
65.9% of source lines run by the tests

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

Browser and end-to-end tests, run once in each engine.
EnginePassFailSkipShare
Chromium64300
Firefox64003
WebKit63904

Coverage

  • 65.9%Lines
  • 56.8%Branches
  • 59.5%Functions
  • 63.0%Statements

By package

Pick a package to see each of its tests and its result in each engine.
PackageTestsLinesBranchesFunctionsStatementsTest : sourceFailing
@ogygia/cli4339.8%40.1%45.7%40.4%0.320
@ogygia/content46677.0%62.7%71.4%73.1%0.470
@ogygia/core2,26473.3%60.8%73.3%70.6%0.620
@ogygia/devtools74954.9%50.1%40.1%51.6%0.350
@ogygia/federation6575.8%62.5%78.6%71.8%1.140
@ogygia/flags4488.0%74.7%86.4%87.4%0.790
@ogygia/machine62796.8%95.9%91.4%96.3%1.590
@ogygia/postrender8089.4%72.9%83.7%87.5%1.240
@ogygia/router5070.4%52.5%69.3%67.7%0.510
@ogygia/testing2779.8%70.7%71.5%78.6%0.810
@ogygia/tooling316.2%13.4%18.1%16.5%0.090

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.