Tests / @ogygia/cli

@ogygia/cli

Version 0.13.1
commit 4b18f465
43 test runs (43 tests, each run in Node, the browsers or both)
0.32× lines of test for each line of source (1,290 to 3,980) 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)
39.8% of source lines run by the tests
  • 43Unit
  • 0Browser
  • 0End to end
  • 0Type tests
  • 0Lint rules
  • 0Failing

Coverage

  • 39.8%Lines
  • 40.1%Branches
  • 45.7%Functions
  • 40.4%Statements

Every test

End-to-end suites are not part of this report yet.

43 tests

TestKindNodeChromiumFirefoxWebKit
packages/cli/test/mcp-profile-busy.test.ts
ogygia_profile while another recording holds the profiler > clears a stale holder with a reset, and records once moreUnitpassnot runnot runnot run
ogygia_profile while another recording holds the profiler > leaves a live window alone and says the profiler is busyUnitpassnot runnot runnot run
packages/cli/test/mcp-profile-digest.test.ts
ogygia_profile digest > a helper site is moot only when EVERY line that called it is in work that goes awayUnitpassnot runnot runnot run
ogygia_profile digest > an older report with no patterns or ledger renders as beforeUnitpassnot runnot runnot run
ogygia_profile digest > every section is one render’s worth, like the render time next to itUnitpassnot runnot runnot run
ogygia_profile digest > leads with the patterns and the exact lines, code includedUnitpassnot runnot runnot run
ogygia_profile digest > names the page's fixes that other profiled pages share, with what each gives back thereUnitpassnot runnot runnot run
ogygia_profile digest > opens with one ordered plan: patterns and work for nothing, by ms per render, each with the line to editUnitpassnot runnot runnot run
ogygia_profile digest > says what changed since the last profile of the page, firstUnitpassnot runnot runnot run
ogygia_profile digest > the plan opens with the report's forecast: code fixes, what keeping answers adds, overlaps namedUnitpassnot runnot runnot run
ogygia_profile digest > with a forecast: the plan follows its order, folds covered fixes in, and says the render after each stepUnitpassnot runnot runnot run
packages/cli/test/mcp-report-load.test.ts
a failed load of the report reading is tried again once the plugin is installedUnitpassnot runnot runnot run
packages/cli/test/perf.test.ts
bisect > a range with no regression names no culprit; a measure that throws counts as a skipUnitpassnot runnot runnot run
bisect > finds the first bad commit in log2 steps, tolerating noise under the barUnitpassnot runnot runnot run
bisect > skips a commit that cannot be built and still lands on the culpritUnitpassnot runnot runnot run
measure > drives the profiler over HTTP with the key, one page at a time, and explains failuresUnitpassnot runnot runnot run
measure > folds a report into a page snapshot: medians, bytes, unique island JS, top rows, warningsUnitpassnot runnot runnot run
number flags > `--margin 0` is a margin of 0, not the defaultUnitpassnot runnot runnot run
number flags > absent, empty or not a number → the defaultUnitpassnot runnot runnot run
verdict > a new page is judged by caps only; a page the run did not measure is listed; a named finding failsUnitpassnot runnot runnot run
verdict > movers: a component whose self time grew past its own budget fails; functions and paths are listedUnitpassnot runnot runnot run
verdict > relative growth over the floor fails; small growth on a tiny page does not; caps are absoluteUnitpassnot runnot runnot run
verdict > the markdown comment and the terminal summary carry the verdictUnitpassnot runnot runnot run
packages/cli/test/serve.test.ts
bisect server > a port someone else holds is refused, naming the portUnitpassnot runnot runnot run
bisect server > a server that exits at once fails at once, with its outputUnitpassnot runnot runnot run
bisect server > a server that ignores SIGTERM is killed after the grace timeUnitpassnot runnot runnot run
bisect server > stop resolves once the server is gone: the port is free right afterUnitpassnot runnot runnot run
bisect server > stop then serve again on the same port: the answer is the new server, never the old oneUnitpassnot runnot runnot run
bisect server > stop waits for the server behind a wrapper that exits at onceUnitpassnot runnot runnot run
packages/cli/test/site-cli.test.ts
site init — --layout > mounts under a nested layout dir with the right baseUnitpassnot runnot runnot run
site init — --layout > rejects a --layout outside src/routesUnitpassnot runnot runnot run
site init — --layout > rejects a --layout that is not a +layout.svelteUnitpassnot runnot runnot run
site init — existing layout > never clobbers an existing layout without --force (and says why)Unitpassnot runnot runnot run
site init — existing layout > overwrites the layout with --forceUnitpassnot runnot runnot run
site init — existing layout > recognises an existing ogygia shell as redeemable and keeps it (no --force needed)Unitpassnot runnot runnot run
site init — guards > errors when not a SvelteKit projectUnitpassnot runnot runnot run
site init — guards > errors when there is no vite configUnitpassnot runnot runnot run
site init — guards > prints usage for `site` with no subcommandUnitpassnot runnot runnot run
site init — re-runs > is idempotent: a second run keeps existing filesUnitpassnot runnot runnot run
site init — re-runs > keeps the user’s own content instead of writing starter pagesUnitpassnot runnot runnot run
site init — svelte.config project > every generated file that reads the site names it by what it importsUnitpassnot runnot runnot run
site init — svelte.config project > scaffolds the full site and wires configs correctlyUnitpassnot runnot runnot run
site init — vite.config project > routes svelte options into the sveltekit() callUnitpassnot runnot runnot run