Tests / @ogygia/testing

@ogygia/testing

Version 0.14.0 latest
commit 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

TestKindNodeChromiumFirefoxWebKit
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 endnot runpasspasspass
a router navigation handed to the browser and held back leaves page() on the same pageEnd to endnot runpasspasspass
page() and hydration(): the planted problems, as a test sees themEnd to endnot runpasspasspass
profile(): the server profile of a path, and compare() over two runsEnd to endnot runpasspasspass
record() across a full page load: one session, both pagesEnd to endnot runpasspasspass
record() across an in-app navigation: the first page keeps its island namesEnd to endnot runpasspasspass
record(): a session of clicks, with the server split of the request one madeEnd to endnot runpasspasspass
record({ blockNavigation }): a click that would load another document is held back and listedEnd to endnot runpasspasspass
says the page left, with the actions’ own error as the causeEnd to endnot runpasspasspass
the testing API in full, and nothing else of devtools: no launcher, no event side-channelEnd to endnot runpasspasspass
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 engineUnitpassnot runnot runnot run
the engine reaches a custom driver > addInitScript gets the engine script once, as the Ogygia is made, before any evaluateUnitpassnot runnot runnot run
the engine reaches a custom driver > an addInitScript that fails is the error the first call givesUnitpassnot runnot runnot run
packages/testing/test/testing-primitives.test.ts
checkBudget > a line with nothing measured fails, and says soUnitpassnot runnot runnot run
checkBudget > reads each report kindUnitpassnot runnot runnot run
compare / toMarkdown > the files behind a JS move, known by what they hold (hashed names change every build)Unitpassnot runnot runnot run
compare / toMarkdown > what moved between two runs of the same testUnitpassnot runnot runnot run
compare: hydration, session counts, vitals > a session meets a CLS budgetUnitpassnot runnot runnot run
compare: hydration, session counts, vitals > names the island instance that broke and the one that was fixedUnitpassnot runnot runnot run
compare: hydration, session counts, vitals > reports without keys compare as a tally per name and statusUnitpassnot runnot runnot run
compare: hydration, session counts, vitals > session counts and vitals past the noise, in the markdownUnitpassnot runnot runnot 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 doesUnitpassnot runnot runnot run
compare: hydration, session counts, vitals > several runs of hydration: each instance by its most common statusUnitpassnot runnot runnot run
matchers > toHaveNoFindings by severity and ignoreUnitpassnot runnot runnot run
matchers > toHydrateCleanly can let attribute-only changes, or changes under input, throughUnitpassnot runnot runnot run
matchers > toHydrateCleanly names the island and the first differenceUnitpassnot runnot runnot run
Ogygia > an older site’s engine: navigations filled in from what the driver held, finding names empty, warned onceUnitpassnot runnot runnot run
Ogygia > drives any page driver, and tells you when the page has no testing APIUnitpassnot runnot runnot run
Ogygia > hydration() asks the page to key islands by the app’s attributeUnitpassnot runnot runnot run
Ogygia > ignoreAttributes crosses into the page as plain data (a RegExp as its source)Unitpassnot runnot runnot run
Ogygia > profile() keeps its own kind over the profiler JSONUnitpassnot runnot runnot 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)#291Unitpassnot runnot runnot run
Ogygia > record() whose page cannot start recording stops the window and the navigation blocker (#291)#291Unitpassnot runnot runnot run
Ogygia > record(): a page that left for another document says so, with the actions’ own error as the causeUnitpassnot runnot runnot run
Ogygia > record(): actions that fail, then an undo that fails too: the actions’ error is the one thrownUnitpassnot runnot runnot run
Ogygia > record(): the actions’ error still surfaces when the page stayedUnitpassnot runnot runnot run
Ogygia > record({ blockNavigation }): the driver holds the loads back and the page lists themUnitpassnot runnot runnot run
Ogygia > record({ server }): a window that fails leaves the session whole, with server.errorUnitpassnot runnot runnot run
Ogygia > record({ server }): the window id rides every request the session makes, and its stopUnitpassnot runnot runnot run
Ogygia > the older-engine warning is said once per site for the whole process, not per pageUnitpassnot runnot runnot run