Tests / @ogygia/tooling
@ogygia/tooling
commit
068c9658 67 test runs (67 tests, each run in Node, the browsers or both)
0.40× lines of test for each line of source (862 to 2,159) 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)29.1% of source lines run by the tests
- 67Unit
- 0Browser
- 0End to end
- 0Type tests
- 0Lint rules
- 0Failing
Coverage
- 29.1%Lines
- 25.5%Branches
- 25.5%Functions
- 28.1%Statements
Every test
67 tests
| Test | Kind | Node | Chromium | Firefox | WebKit |
|---|---|---|---|---|---|
packages/tooling/test/e2e-browsers.test.ts | |||||
| console_text > falls back to Playwright's text when the message has no arguments | Unit | pass | not run | not run | not run |
| console_text > joins each argument's own text, an Error as its name and message | Unit | pass | not run | not run | not run |
| console_text > reads an argument of a page that left as empty text, without throwing | Unit | pass | not run | not run | not run |
| page_errors > keeps that line in Chromium and Firefox | Unit | pass | not run | not run | not run |
| page_errors > leaves out WebKit's line for a fetch that failed at the network, read from the stack's first line | Unit | pass | not run | not run | not run |
packages/tooling/test/e2e-build.test.ts | |||||
| e2e build > a build that fails throws, naming the app | Unit | pass | not run | not run | not run |
| e2e build > a fresh checkout's build finds the tsconfig the app extends: Kit's sync writes .svelte-kit first | Unit | pass | not run | not run | not run |
| e2e build > a package's e2e task builds the libraries its fixture app installs before the app starts | Unit | pass | not run | not run | not run |
| e2e build > an app whose Kit cannot sync throws before building, naming the app | Unit | pass | not run | not run | not run |
| e2e build > as a globalSetup it builds the app in metadata.build | Unit | pass | not run | not run | not run |
| e2e build > E2E_NO_BUILD=1 reuses the existing build: nothing is built | Unit | pass | not run | not run | not run |
| e2e build > run as a command it builds the app in the current directory | Unit | pass | not run | not run | not run |
| e2e build > the build carries ogygia's rules (OGYGIA_RULES=1), so every test's rules check checks (#1272)#1272 | Unit | pass | not run | not run | not run |
| e2e build > the build lands in its own folder, never over the app's production build in .svelte-kit | Unit | pass | not run | not run | not run |
| e2e build > the e2e task builds the app's libraries first, so the build step builds only the app | Unit | pass | not run | not run | not run |
packages/tooling/test/e2e-check.test.ts | |||||
| a page where ogygia booted without its rules fails the rules check, naming why (#1272)#1272 | Unit | pass | not run | not run | not run |
| check(): every check runs, each failure is named with its extra, the test fails once at the end | Unit | pass | not run | not run | not run |
| the siblings import by file name, `.ts` and all, from @ogygia/tooling/e2e/* | Unit | pass | not run | not run | not run |
packages/tooling/test/e2e-config.test.ts | |||||
| suite > a served app is built and previewed in one command chain, never an earlier server | Unit | pass | not run | not run | not run |
| suite > a suite with no server builds its app in a globalSetup | Unit | pass | not run | not run | not run |
| suite > E2E_PORT_OFFSET moves the served port | Unit | pass | not run | not run | not run |
| suite > E2E_SHARD picks a share of the spec files (an env var, not a CLI flag); a bad one throws | Unit | pass | not run | not run | not run |
| suite > each lane of one suite writes its own output folder | Unit | pass | not run | not run | not run |
| suite > every spec runs in each engine: one project per browser | Unit | pass | not run | not run | not run |
| suite > specs run one at a time: the fixture app keeps state they share | Unit | pass | not run | not run | not run |
| suite > the fixture apps under e2e/ are not read for specs | Unit | pass | not run | not run | not run |
packages/tooling/test/e2e-downloads.test.ts | |||||
| downloads > a page with no record made before its goto throws, naming the call it lacks | Unit | pass | not run | not run | not run |
| downloads > a page with the record reads each download heard, as plain fields | Unit | pass | not run | not run | not run |
packages/tooling/test/package-boundaries.test.ts | |||||
| package boundaries > finds the plugin packages it guards against | Unit | pass | not run | not run | not run |
| package boundaries > neither ogygia, core nor the compiler imports a plugin package | Unit | pass | not run | not run | not run |
| package boundaries > neither ogygia, core nor the compiler lists a plugin package | Unit | pass | not run | not run | not run |
| package boundaries > ogygia depends on @ogygia/core and @ogygia/compiler only | Unit | pass | not run | not run | not run |
packages/tooling/test/re.test.ts | |||||
| the shared e2e regexes > every export is a regex, global exactly when its name ends in _G_RE | Unit | pass | not run | not run | not run |
packages/tooling/test/routes.test.ts | |||||
| while_open > a handler that ends normally is awaited, and its route and request reach it | Unit | pass | not run | not run | not run |
| while_open > a handler whose request is gone ends quietly: apiRequestContext.fetch: Request context disposed. | Unit | pass | not run | not run | not run |
| while_open > a handler whose request is gone ends quietly: apiResponse.body: Response has been disposed | Unit | pass | not run | not run | not run |
| while_open > a handler whose request is gone ends quietly: apiResponse.text: Response has been disposed | Unit | pass | not run | not run | not run |
| while_open > a handler whose request is gone ends quietly: route.fetch: Target page, context or browser has been closed | Unit | pass | not run | not run | not run |
| while_open > a handler whose request is gone ends quietly: route.fetch: Test ended. | Unit | pass | not run | not run | not run |
| while_open > a handler whose request is gone ends quietly: route.fetch: Test timeout of 30000ms exceeded. | Unit | pass | not run | not run | not run |
| while_open > a handler whose request is gone ends quietly: route.fulfill: Fetch response has been disposed | Unit | pass | not run | not run | not run |
| while_open > a thrown value that is not an Error still fails the test | Unit | pass | not run | not run | not run |
| while_open > any other error still fails the test: a test said Response has been disposed in its own words | Unit | pass | not run | not run | not run |
| while_open > any other error still fails the test: Cannot read properties of undefined (reading 'includes') | Unit | pass | not run | not run | not run |
| while_open > any other error still fails the test: Route is already handled! | Unit | pass | not run | not run | not run |
| while_open > any other error still fails the test: route.fetch: net::ERR_CONNECTION_REFUSED | Unit | pass | not run | not run | not run |
packages/tooling/test/server-log.test.ts | |||||
| the server log > a test reads what was appended after it started | Unit | pass | not run | not run | not run |
| the server log > outside a suite there is no log, and appending is nothing | Unit | pass | not run | not run | not run |
| the server log > reads each rule a server said, with its detail decoded, once | Unit | pass | not run | not run | not run |
packages/tooling/test/servers.test.ts | |||||
| spawn_server > a port someone else keeps holding fails the spawn, naming the port | Unit | pass | not run | not run | not run |
| spawn_server > a server that ignores SIGTERM is killed after the grace time | Unit | pass | not run | not run | not run |
| spawn_server > kill() resolves once the server is gone: the port is free right after | Unit | pass | not run | not run | not run |
packages/tooling/test/sim-replay.node.test.ts | |||||
| an eager press, at the moment of the load the simulator pressed at > at once, in a plan with nothing seen | Unit | pass | not run | not run | not run |
| an eager press, at the moment of the load the simulator pressed at > at once, when the press woke an island in the simulator | Unit | pass | not run | not run | not run |
| an eager press, at the moment of the load the simulator pressed at > at once, when the simulator pressed while it waited | Unit | pass | not run | not run | not run |
| an eager press, at the moment of the load the simulator pressed at > at rest, when the simulator pressed once its critical wait settled and its islands woke | Unit | pass | not run | not run | not run |
| layout shift and long tasks, judged > fails a document whose regions' shifts add up to the limit, and notes a smaller one | Unit | pass | not run | not run | not run |
| layout shift and long tasks, judged > fails a long task in ogygia's code only | Unit | pass | not run | not run | not run |
| the real-browser tier plays a plan on its own app > plays a generated app plan only on the app its seed wrote | Unit | pass | not run | not run | not run |
| the real-browser tier plays a plan on its own app > plays a plan of a hand-written app on that app, from any checkout | Unit | pass | not run | not run | not run |
| the real-browser tier plays a plan on its own app > skips a generated app that drew a peer | Unit | pass | not run | not run | not run |
| the real-browser tier plays a plan on its own app > skips a plan of another app | Unit | pass | not run | not run | not run |
packages/tooling/test/trace.test.ts | |||||
| moves(page) > is null for a page that keeps none, or one that closed | Unit | pass | not run | not run | not run |
| moves(page) > reads the page's moves | Unit | pass | not run | not run | not run |
| trace_on_failure > prints nothing for a test that passes | Unit | pass | not run | not run | not run |
| trace_on_failure > prints the test's machine moves when it fails, even after its teardown stopped them | Unit | pass | not run | not run | not run |
| trace_on_failure > says so when no machine moved | Unit | pass | not run | not run | not run |