Tests / @ogygia/insights

@ogygia/insights

Version 0.14.0 latest
commit 620ddcca
130 test runs (130 tests, each run in Node, the browsers or both)
0.61× lines of test for each line of source (3,708 to 6,093) 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)
79.0% of source lines run by the tests
  • 130Unit
  • 0Browser
  • 0End to end
  • 0Type tests
  • 0Lint rules
  • 0Failing

Coverage

  • 79.0%Lines
  • 68.3%Branches
  • 74.3%Functions
  • 75.8%Statements

Every test

130 tests

TestKindNodeChromiumFirefoxWebKit
packages/insights/test/devtools-cpu.test.ts
analyze_cpu > a stall between samples is not all CPUUnitpassnot runnot runnot run
analyze_cpu > adds busy time by kind, skipping idle samplesUnitpassnot runnot runnot run
analyze_cpu > attributes CPU to the island whose hydrate window it fell in, and long tasks outsideUnitpassnot runnot runnot run
analyze_cpu > names the functions, with the measuring itself left out of the top listUnitpassnot runnot runnot run
clean_file / kind_of > reads Vite dev URLsUnitpassnot runnot runnot run
packages/insights/test/devtools-fp-drift.test.ts
fp drift > a server render’s ids: the fence is left out, a moved place is namedUnitpassnot runnot runnot run
fp drift > islands are matched by entry and their place among copies; an unchanged one is quietUnitpassnot runnot runnot run
fp drift > names the prop that differs (JSON lane): a nested path, the two valuesUnitpassnot runnot runnot run
fp drift > ogygia’s own ids are left out: only they differ → no driftUnitpassnot runnot runnot run
fp drift > the devalue lane: the prop is named by its path in the props, never a slot of the flat tableUnitpassnot runnot runnot run
packages/insights/test/devtools-html-diff.test.ts
html_diff > an added attribute and an extra elementUnitpassnot runnot runnot run
html_diff > gives up gracefully on a huge rewriteUnitpassnot runnot runnot run
html_diff > identical markup (comments aside) has no hunksUnitpassnot runnot runnot run
html_diff > names exactly what changed, with contextUnitpassnot runnot runnot run
tokenize > tags and text, comments out, whitespace foldedUnitpassnot runnot runnot run
packages/insights/test/devtools-page-insights.test.ts
a markup change that is only URL encoding > a note, not markup-changed (which still names a real change beside it)Unitpassnot runnot runnot run
a markup change that is only URL encoding > encoding_only: the same once decoded; a real change, or a stray %, is notUnitpassnot runnot runnot run
a page of many elements > an island with a small share is not blamed; a past-60,000 count says only the count; under 1,500 quietUnitpassnot runnot runnot run
a page of many elements > names the island holding most of them, linkedUnitpassnot runnot runnot run
a shift the dev server made > right after a component's CSS module arrived (dev): a note that it is the dev server's; on a build, notUnitpassnot runnot runnot run
a shift the dev server's CSS made is not the island's waking > dev: a shift right after a component CSS module landed is left out; a build counts itUnitpassnot runnot runnot run
a shift the dev server's CSS made is not the island's waking > dev: another island's own sheet, landing below the moved island, did not push itUnitpassnot runnot runnot run
an island that threw its server HTML away (recovered) > a script edited it first (the runtime healed it): the edit is the causeUnitpassnot runnot runnot run
an island that threw its server HTML away (recovered) > no browser script edited it before waking: a rewrite on the way or the component itself, and where to lookUnitpassnot runnot runnot run
an island that threw its server HTML away (recovered) > the same markup came back, its markers unpaired as it arrived: rewritten on the way, not ogygiaUnitpassnot runnot runnot run
an island that threw its server HTML away (recovered) > the same markup came back: no line of its blamed, its own finding; one that drew another tree keeps the lineUnitpassnot runnot runnot run
an island that threw its server HTML away (recovered) > with the dev server reading its sources: the likeliest line, and the fix for itUnitpassnot runnot runnot run
an island's effects are its own work > effects run after hydrate() returns: the long task is the island's, the next island waited behind itUnitpassnot runnot runnot run
analyze_page > a bare attribute on a custom element (server "", browser "true") is named as the causeUnitpassnot runnot runnot run
analyze_page > a batch request that did not carry its holes is named with what answered and what it costUnitpassnot runnot runnot run
analyze_page > a browser with no layout-shift timing: a wake's shift is estimated from the island's box, said soUnitpassnot runnot runnot run
analyze_page > a browser with no long-task timing: the stalls are frames drawn late, said soUnitpassnot runnot runnot run
analyze_page > a build's small blocking stylesheets: the inlineStyleThreshold that takes them off the paintUnitpassnot runnot runnot run
analyze_page > a click on an island that never woke counts tooUnitpassnot runnot runnot run
analyze_page > a first byte beyond the render: on the dev server, the page compiling (a note, reload); elsewhere, before the renderUnitpassnot runnot runnot run
analyze_page > a healthy page has no findingsUnitpassnot runnot runnot run
analyze_page > a hole whose answer never came is an error, with the cause and where to lookUnitpassnot runnot runnot run
analyze_page > a hole whose fallback sat on the first screen long is named; a quick or scrolled-to one is notUnitpassnot runnot runnot run
analyze_page > a later success clears nothing it should not: a wake-at-load island asleep 3 s after loadUnitpassnot runnot runnot run
analyze_page > a preload the browser could not use, and paid for twice: named, with the fix for its kindUnitpassnot runnot runnot run
analyze_page > a queued island names the islands that ran ahead of itUnitpassnot runnot runnot run
analyze_page > a server transform’s restore gone wrong: a host upgraded first, and a mismatch, each named with its islandUnitpassnot runnot runnot run
analyze_page > a slow first byte on a page the last profile found prerendered: a file being served, not a render to profileUnitpassnot runnot runnot run
analyze_page > a slow in-app navigation: its split, the islands after it, the fix for the part that cost most; a quick one neverUnitpassnot runnot runnot run
analyze_page > a slow navigation’s fetch, split by the page request’s timing: the server, a heavy page, a prefetchUnitpassnot runnot runnot run
analyze_page > an eager island that draws nothing on this screen: not "below the first screen", the screens that show itUnitpassnot runnot runnot run
analyze_page > an interaction island clicked before it woke is by design, not a lost clickUnitpassnot runnot runnot run
analyze_page > an island whose own file was gone: the page outlived its build — woke on the current code, or stayed asleepUnitpassnot runnot runnot run
analyze_page > an island’s barrel says why the barrel pass left it, in its wordsUnitpassnot runnot runnot run
analyze_page > an island’s code: a barrel imported whole, and one module most of its weightUnitpassnot runnot runnot run
analyze_page > blocking files matter only when they held the paint backUnitpassnot runnot runnot run
analyze_page > content-named files fetched again: revalidated (a round trip each) and downloaded on a reload, heaviest named firstUnitpassnot runnot runnot run
analyze_page > eager islands below the fold, but not lazy onesUnitpassnot runnot runnot run
analyze_page > eager islands below the fold: their own bytes (each island once), a warning past 50 KBUnitpassnot runnot runnot run
analyze_page > held for a failing first-screen island: not ogygia’s wait, and queued names what it was held forUnitpassnot runnot runnot run
analyze_page > held with nothing ahead: the scheduler’s own wait is named, and only thatUnitpassnot runnot runnot run
analyze_page > long tasks outside hydration are the page scriptsUnitpassnot runnot runnot run
analyze_page > pins each measured problem on its islandUnitpassnot runnot runnot run
analyze_page > the first byte, explained (slow-ttfb): each step before it, the server’s Server-Timing, the fix for the costliestUnitpassnot runnot runnot run
analyze_page > the first paint, explained (slow-fcp): first byte, the HTML, what blocked it, the rest; the fix for the costliestUnitpassnot runnot runnot run
analyze_page > the largest paint in an island that rendered it again on hydrationUnitpassnot runnot runnot run
analyze_page > the largest paint, explained (slow-lcp): the element, its island, its four parts, the fix for the most of itUnitpassnot runnot runnot run
analyze_page > the Page tab quotes the profiler’s last run of the page (devtools only), or says how to get oneUnitpassnot runnot runnot run
analyze_page > the slowest interaction, explained (slow-interaction) > a good INP says nothing; an INP without the interaction keeps the bare vitalUnitpassnot runnot runnot run
analyze_page > the slowest interaction, explained (slow-interaction) > a handler that forced layout: how much of it, and the read-then-write fix; a little neverUnitpassnot runnot runnot run
analyze_page > the slowest interaction, explained (slow-interaction) > another origin’s listener keeps its own nameUnitpassnot runnot runnot run
analyze_page > the slowest interaction, explained (slow-interaction) > it waited behind a script in a long frame: the script, its function and what ran itUnitpassnot runnot runnot run
analyze_page > the slowest interaction, explained (slow-interaction) > it waited behind an island hydrating: named, and the fix is about waking laterUnitpassnot runnot runnot run
analyze_page > the slowest interaction, explained (slow-interaction) > its own handler: the island clicked, the button, the phases, and the island's handler (Svelte's dispatcher never named)Unitpassnot runnot runnot run
analyze_page > the slowest interaction, explained (slow-interaction) > sampled: the handler’s function by name; its line only when the frames were source-mappedUnitpassnot runnot runnot run
analyze_page > the slowest interaction, explained (slow-interaction) > sampled: the wait names the function that held the thread, and what ran itUnitpassnot runnot runnot run
analyze_page > the slowest interaction, explained (slow-interaction) > the paint cost most: said so; a key press outside any island reads as suchUnitpassnot runnot runnot run
analyze_page > the worst shifts, explained (shift-cause): the burst, what moved, the cause just before, its fixUnitpassnot runnot runnot run
dev compile on a first request > late even without the compile, or not on the dev server: still a warning, said plainlyUnitpassnot runnot runnot run
dev compile on a first request > late only because the dev server compiled its code: a note that says soUnitpassnot runnot runnot run
dev compile on a first request > slow module: the compile namedUnitpassnot runnot runnot run
first_difference > ignores re-anchored block markers and finds the visible changeUnitpassnot runnot runnot run
first_difference > ignores the runtime's own marks on a nested island, and finds the real change past themUnitpassnot runnot runnot run
forced layout > the CPU trace's place, the island named once when the time is its own codeUnitpassnot runnot runnot run
forced layout > the runtime task is put on the island whose hydration overlaps it most; a page script by its fileUnitpassnot runnot runnot run
forced layout > under 30 ms for each: quietUnitpassnot runnot runnot run
images far below the first screen that loaded at start > names each file once (×N for copies), how far down, the island; biggest firstUnitpassnot runnot runnot run
images far below the first screen that loaded at start > the ones whose download overlapped a slow hero are named in its LCP splitUnitpassnot runnot runnot run
images far below the first screen that loaded at start > under 100 KB in all: quietUnitpassnot runnot runnot run
images sent far bigger than shown > a small total waste is quietUnitpassnot runnot runnot run
images sent far bigger than shown > names the image, its sizes and the bytes nobody sees; the biggest waste firstUnitpassnot runnot runnot run
images the browser could hold no room for > a note; a warning once the page movedUnitpassnot runnot runnot run
kept out of the back/forward cache > names who adds an 'unload' listener, and the browser's reasons when Back did not restoreUnitpassnot runnot runnot run
kept out of the back/forward cache > the profiler's run saw the page answer no-store: said, with or without an unload listenerUnitpassnot runnot runnot run
listeners that hold scrolling > names each with its owner, event and element; passive: false saidUnitpassnot runnot runnot run
one package, two copies on the dev server > a package pre-bundled and served raw from its folder: named once, with its raw files; the pre-bundle alone is quietUnitpassnot runnot runnot run
one package, two copies on the dev server > the pre-bundled packages from the dev server's metadata keys, a dependency's dependency by its own nameUnitpassnot runnot runnot run
preloaded, never used > names each file, what it is, and why nothing used itUnitpassnot runnot runnot run
rate > uses the web-vitals linesUnitpassnot runnot runnot run
scrolling stalled > a frame or two of 60 ms: quietUnitpassnot runnot runnot run
scrolling stalled > names the frames, the worst, and the script that held them most with what ran itUnitpassnot runnot runnot run
text kept invisible by its font > a font-display auto face whose file landed after the first paint; swap, or early, quietUnitpassnot runnot runnot run
text kept invisible by its font > Safari's way: no paint counted until the text shows — the font landing just before a late first paint held itUnitpassnot runnot runnot run
text sent uncompressed > names each file, its kind and size; a warning past 100 KBUnitpassnot runnot runnot run
text sent uncompressed > the page's own HTML, firstUnitpassnot runnot runnot run
text sent uncompressed > under 20 KB in all, or on the dev server: nothingUnitpassnot runnot runnot run
the dock in its own measurement > open as the page loaded, the first paint just after it: said, the browser named; a paint long after, or no dock, quietUnitpassnot runnot runnot run
the font the largest paint waited for > a text paint right after a hidden face landed names it; swap, an image paint, or a paint long after, does notUnitpassnot runnot runnot run
the font the largest paint waited for > Safari's way: the first paint is the largest, just after the font landed, long after the HTML — the font'sUnitpassnot runnot runnot run
the font the largest paint waited for > the LCP's split and parts carry the font waitUnitpassnot runnot runnot run
the largest paint marked lazy > named, with its file and island; a largest paint without it quietUnitpassnot runnot runnot run
without_comments > drops every comment and keeps the restUnitpassnot runnot runnot run
without_runtime_marks > drops only the empty marks the runtime setsUnitpassnot runnot runnot run
packages/insights/test/devtools-third-party.test.ts
a browser that hides other origins' sizes: scripts counted, never called 0 KBUnitpassnot runnot runnot run
an awake island with an empty children slot is namedUnitpassnot runnot runnot run
by origin: kinds, bytes, blocking, runtime-loaded, main-thread timeUnitpassnot runnot runnot run
findings: the heaviest with a fix per kind, the blocking origin, the island a third party could have editedUnitpassnot runnot runnot run
packages/insights/test/hydration-attr-changes.test.ts
apply_attr_rules > a removed attribute is matched by its old valueUnitpassnot runnot runnot run
apply_attr_rules > by tag, name and new value; exact strings and patternsUnitpassnot runnot runnot run
apply_attr_rules > no rules: nothing ignoredUnitpassnot runnot runnot run
attr_changes > a changed valueUnitpassnot runnot runnot run
attr_changes > each attribute a custom element set, added, removed or changedUnitpassnot runnot runnot run
attr_changes > text or elements that differ are not attributes onlyUnitpassnot runnot runnot run
attr_changes > the same attributes in another order: attributes only, nothing to nameUnitpassnot runnot runnot run
packages/insights/test/profiler-page-assets.test.ts
import scanners > static imports of bundled output, not dynamic ones or look-alikesUnitpassnot runnot runnot run
Kit route nodes > the ogygia runtime's on-demand parts are its own, loaded later (with what they import)Unitpassnot runnot runnot run
Kit route nodes > the page's own node (reachable only by app.js's dynamic import) is weighed; other routes' are notUnitpassnot runnot runnot run
runtime_scripts > this app's island entries no HTML named (a hole's islands) are counted apart; a CDN's parts are notUnitpassnot runnot runnot run
scan_assets > attributes: quoted, unquoted, valueless, entitiesUnitpassnot runnot runnot run
scan_assets > finds every file the document loads at start, with what blocksUnitpassnot runnot runnot run
scan_assets > reads the page as core’s tag walk does: comments end where the browser ends them, a textarea or title holds no tag (#1370)#1370Unitpassnot runnot runnot run
scan_assets > tags are read as a browser reads them: a quoted `>`, an upper-case closeUnitpassnot runnot runnot run
weigh_assets > a file the host could not answer now (a 5xx, a rate limit) is weighed again by the next report; a 404 is notUnitpassnot runnot runnot run
weigh_assets > weighs every file, follows static imports, keeps lazy islands apartUnitpassnot runnot runnot run
packages/insights/test/svelte-warnings.test.ts
the finding groups them and names the island when it knows itUnitpassnot runnot runnot run