Tests / @ogygia/testing
@ogygia/testing
Version 0.14.0 latest
620ddcca 40 test runs (40 tests, each run in Node, the browsers or both)
0.79× lines of test for each line of source (1,131 to 1,426) 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)74.0% of source lines run by the tests
- 30Unit
- 0Browser
- 10End to end
- 0Type tests
- 0Lint rules
- 0Failing
Coverage
- 74.0%Lines
- 69.4%Branches
- 61.2%Functions
- 73.1%Statements
Every test
40 tests
| Test | Kind | Node | Chromium | Firefox | WebKit |
|---|---|---|---|---|---|
packages/testing/e2e/ogygia-testing.spec.ts | |||||
| a reload in a click handler is named by the button that ran it, run after run (the exported driver) | End to end | not run | pass | pass | pass |
| a router navigation handed to the browser and held back leaves page() on the same page | End to end | not run | pass | pass | pass |
| page() and hydration(): the planted problems, as a test sees them | End to end | not run | pass | pass | pass |
| profile(): the server profile of a path, and compare() over two runs | End to end | not run | pass | pass | pass |
| record() across a full page load: one session, both pages | End to end | not run | pass | pass | pass |
| record() across an in-app navigation: the first page keeps its island names | End to end | not run | pass | pass | pass |
| record(): a session of clicks, with the server split of the request one made | End to end | not run | pass | pass | pass |
| record({ blockNavigation }): a click that would load another document is held back and listed | End to end | not run | pass | pass | pass |
| says the page left, with the actions’ own error as the cause | End to end | not run | pass | pass | pass |
| the testing API in full, and nothing else of devtools: no launcher, no event side-channel | End to end | not run | pass | pass | pass |
packages/testing/test/driver-engine.test.ts | |||||
| the engine reaches a custom driver > a driver without addInitScript still works against a page that has the engine | Unit | pass | not run | not run | not run |
| the engine reaches a custom driver > addInitScript gets the engine script once, as the Ogygia is made, before any evaluate | Unit | pass | not run | not run | not run |
| the engine reaches a custom driver > an addInitScript that fails is the error the first call gives | Unit | pass | not run | not run | not run |
packages/testing/test/testing-primitives.test.ts | |||||
| checkBudget > a line with nothing measured fails, and says so | Unit | pass | not run | not run | not run |
| checkBudget > reads each report kind | Unit | pass | not run | not run | not run |
| compare / toMarkdown > the files behind a JS move, known by what they hold (hashed names change every build) | Unit | pass | not run | not run | not run |
| compare / toMarkdown > what moved between two runs of the same test | Unit | pass | not run | not run | not run |
| compare: hydration, session counts, vitals > a session meets a CLS budget | Unit | pass | not run | not run | not run |
| compare: hydration, session counts, vitals > names the island instance that broke and the one that was fixed | Unit | pass | not run | not run | not run |
| compare: hydration, session counts, vitals > reports without keys compare as a tally per name and status | Unit | pass | not run | not run | not run |
| compare: hydration, session counts, vitals > session counts and vitals past the noise, in the markdown | Unit | pass | not run | not run | not run |
| compare: hydration, session counts, vitals > several runs a side: load signals by median and majority, session signals only when every head run has them and no base run does | Unit | pass | not run | not run | not run |
| compare: hydration, session counts, vitals > several runs of hydration: each instance by its most common status | Unit | pass | not run | not run | not run |
| matchers > toHaveNoFindings by severity and ignore | Unit | pass | not run | not run | not run |
| matchers > toHydrateCleanly can let attribute-only changes, or changes under input, through | Unit | pass | not run | not run | not run |
| matchers > toHydrateCleanly names the island and the first difference | Unit | pass | not run | not run | not run |
| Ogygia > an older site’s engine: navigations filled in from what the driver held, finding names empty, warned once | Unit | pass | not run | not run | not run |
| Ogygia > drives any page driver, and tells you when the page has no testing API | Unit | pass | not run | not run | not run |
| Ogygia > hydration() asks the page to key islands by the app’s attribute | Unit | pass | not run | not run | not run |
| Ogygia > ignoreAttributes crosses into the page as plain data (a RegExp as its source) | Unit | pass | not run | not run | not run |
| Ogygia > profile() keeps its own kind over the profiler JSON | Unit | pass | not run | not run | not run |
| Ogygia > record() that fails early lets go of what it started: the window stops, the requests are untagged, the next one starts at once (#291)#291 | Unit | pass | not run | not run | not run |
| Ogygia > record() whose page cannot start recording stops the window and the navigation blocker (#291)#291 | Unit | pass | not run | not run | not run |
| Ogygia > record(): a page that left for another document says so, with the actions’ own error as the cause | Unit | pass | not run | not run | not run |
| Ogygia > record(): actions that fail, then an undo that fails too: the actions’ error is the one thrown | Unit | pass | not run | not run | not run |
| Ogygia > record(): the actions’ error still surfaces when the page stayed | Unit | pass | not run | not run | not run |
| Ogygia > record({ blockNavigation }): the driver holds the loads back and the page lists them | Unit | pass | not run | not run | not run |
| Ogygia > record({ server }): a window that fails leaves the session whole, with server.error | Unit | pass | not run | not run | not run |
| Ogygia > record({ server }): the window id rides every request the session makes, and its stop | Unit | pass | not run | not run | not run |
| Ogygia > the older-engine warning is said once per site for the whole process, not per page | Unit | pass | not run | not run | not run |