Tests / @ogygia/insights
@ogygia/insights
Version 0.14.0 latest
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
| Test | Kind | Node | Chromium | Firefox | WebKit |
|---|---|---|---|---|---|
packages/insights/test/devtools-cpu.test.ts | |||||
| analyze_cpu > a stall between samples is not all CPU | Unit | pass | not run | not run | not run |
| analyze_cpu > adds busy time by kind, skipping idle samples | Unit | pass | not run | not run | not run |
| analyze_cpu > attributes CPU to the island whose hydrate window it fell in, and long tasks outside | Unit | pass | not run | not run | not run |
| analyze_cpu > names the functions, with the measuring itself left out of the top list | Unit | pass | not run | not run | not run |
| clean_file / kind_of > reads Vite dev URLs | Unit | pass | not run | not run | not 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 named | Unit | pass | not run | not run | not run |
| fp drift > islands are matched by entry and their place among copies; an unchanged one is quiet | Unit | pass | not run | not run | not run |
| fp drift > names the prop that differs (JSON lane): a nested path, the two values | Unit | pass | not run | not run | not run |
| fp drift > ogygia’s own ids are left out: only they differ → no drift | Unit | pass | not run | not run | not run |
| fp drift > the devalue lane: the prop is named by its path in the props, never a slot of the flat table | Unit | pass | not run | not run | not run |
packages/insights/test/devtools-html-diff.test.ts | |||||
| html_diff > an added attribute and an extra element | Unit | pass | not run | not run | not run |
| html_diff > gives up gracefully on a huge rewrite | Unit | pass | not run | not run | not run |
| html_diff > identical markup (comments aside) has no hunks | Unit | pass | not run | not run | not run |
| html_diff > names exactly what changed, with context | Unit | pass | not run | not run | not run |
| tokenize > tags and text, comments out, whitespace folded | Unit | pass | not run | not run | not 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) | Unit | pass | not run | not run | not run |
| a markup change that is only URL encoding > encoding_only: the same once decoded; a real change, or a stray %, is not | Unit | pass | not run | not run | not 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 quiet | Unit | pass | not run | not run | not run |
| a page of many elements > names the island holding most of them, linked | Unit | pass | not run | not run | not 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, not | Unit | pass | not run | not run | not 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 it | Unit | pass | not run | not run | not 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 it | Unit | pass | not run | not run | not run |
| an island that threw its server HTML away (recovered) > a script edited it first (the runtime healed it): the edit is the cause | Unit | pass | not run | not run | not 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 look | Unit | pass | not run | not run | not 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 ogygia | Unit | pass | not run | not run | not 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 line | Unit | pass | not run | not run | not run |
| an island that threw its server HTML away (recovered) > with the dev server reading its sources: the likeliest line, and the fix for it | Unit | pass | not run | not run | not 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 it | Unit | pass | not run | not run | not run |
| analyze_page > a bare attribute on a custom element (server "", browser "true") is named as the cause | Unit | pass | not run | not run | not run |
| analyze_page > a batch request that did not carry its holes is named with what answered and what it cost | Unit | pass | not run | not run | not run |
| analyze_page > a browser with no layout-shift timing: a wake's shift is estimated from the island's box, said so | Unit | pass | not run | not run | not run |
| analyze_page > a browser with no long-task timing: the stalls are frames drawn late, said so | Unit | pass | not run | not run | not run |
| analyze_page > a build's small blocking stylesheets: the inlineStyleThreshold that takes them off the paint | Unit | pass | not run | not run | not run |
| analyze_page > a click on an island that never woke counts too | Unit | pass | not run | not run | not run |
| analyze_page > a first byte beyond the render: on the dev server, the page compiling (a note, reload); elsewhere, before the render | Unit | pass | not run | not run | not run |
| analyze_page > a healthy page has no findings | Unit | pass | not run | not run | not run |
| analyze_page > a hole whose answer never came is an error, with the cause and where to look | Unit | pass | not run | not run | not run |
| analyze_page > a hole whose fallback sat on the first screen long is named; a quick or scrolled-to one is not | Unit | pass | not run | not run | not run |
| analyze_page > a later success clears nothing it should not: a wake-at-load island asleep 3 s after load | Unit | pass | not run | not run | not run |
| analyze_page > a preload the browser could not use, and paid for twice: named, with the fix for its kind | Unit | pass | not run | not run | not run |
| analyze_page > a queued island names the islands that ran ahead of it | Unit | pass | not run | not run | not run |
| analyze_page > a server transform’s restore gone wrong: a host upgraded first, and a mismatch, each named with its island | Unit | pass | not run | not run | not run |
| analyze_page > a slow first byte on a page the last profile found prerendered: a file being served, not a render to profile | Unit | pass | not run | not run | not 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 never | Unit | pass | not run | not run | not run |
| analyze_page > a slow navigation’s fetch, split by the page request’s timing: the server, a heavy page, a prefetch | Unit | pass | not run | not run | not run |
| analyze_page > an eager island that draws nothing on this screen: not "below the first screen", the screens that show it | Unit | pass | not run | not run | not run |
| analyze_page > an interaction island clicked before it woke is by design, not a lost click | Unit | pass | not run | not run | not run |
| analyze_page > an island whose own file was gone: the page outlived its build — woke on the current code, or stayed asleep | Unit | pass | not run | not run | not run |
| analyze_page > an island’s barrel says why the barrel pass left it, in its words | Unit | pass | not run | not run | not run |
| analyze_page > an island’s code: a barrel imported whole, and one module most of its weight | Unit | pass | not run | not run | not run |
| analyze_page > blocking files matter only when they held the paint back | Unit | pass | not run | not run | not run |
| analyze_page > content-named files fetched again: revalidated (a round trip each) and downloaded on a reload, heaviest named first | Unit | pass | not run | not run | not run |
| analyze_page > eager islands below the fold, but not lazy ones | Unit | pass | not run | not run | not run |
| analyze_page > eager islands below the fold: their own bytes (each island once), a warning past 50 KB | Unit | pass | not run | not run | not run |
| analyze_page > held for a failing first-screen island: not ogygia’s wait, and queued names what it was held for | Unit | pass | not run | not run | not run |
| analyze_page > held with nothing ahead: the scheduler’s own wait is named, and only that | Unit | pass | not run | not run | not run |
| analyze_page > long tasks outside hydration are the page scripts | Unit | pass | not run | not run | not run |
| analyze_page > pins each measured problem on its island | Unit | pass | not run | not run | not run |
| analyze_page > the first byte, explained (slow-ttfb): each step before it, the server’s Server-Timing, the fix for the costliest | Unit | pass | not run | not run | not run |
| analyze_page > the first paint, explained (slow-fcp): first byte, the HTML, what blocked it, the rest; the fix for the costliest | Unit | pass | not run | not run | not run |
| analyze_page > the largest paint in an island that rendered it again on hydration | Unit | pass | not run | not run | not run |
| analyze_page > the largest paint, explained (slow-lcp): the element, its island, its four parts, the fix for the most of it | Unit | pass | not run | not run | not run |
| analyze_page > the Page tab quotes the profiler’s last run of the page (devtools only), or says how to get one | Unit | pass | not run | not run | not run |
| analyze_page > the slowest interaction, explained (slow-interaction) > a good INP says nothing; an INP without the interaction keeps the bare vital | Unit | pass | not run | not run | not 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 never | Unit | pass | not run | not run | not run |
| analyze_page > the slowest interaction, explained (slow-interaction) > another origin’s listener keeps its own name | Unit | pass | not run | not run | not 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 it | Unit | pass | not run | not run | not run |
| analyze_page > the slowest interaction, explained (slow-interaction) > it waited behind an island hydrating: named, and the fix is about waking later | Unit | pass | not run | not run | not 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) | Unit | pass | not run | not run | not run |
| analyze_page > the slowest interaction, explained (slow-interaction) > sampled: the handler’s function by name; its line only when the frames were source-mapped | Unit | pass | not run | not run | not run |
| analyze_page > the slowest interaction, explained (slow-interaction) > sampled: the wait names the function that held the thread, and what ran it | Unit | pass | not run | not run | not run |
| analyze_page > the slowest interaction, explained (slow-interaction) > the paint cost most: said so; a key press outside any island reads as such | Unit | pass | not run | not run | not run |
| analyze_page > the worst shifts, explained (shift-cause): the burst, what moved, the cause just before, its fix | Unit | pass | not run | not run | not run |
| dev compile on a first request > late even without the compile, or not on the dev server: still a warning, said plainly | Unit | pass | not run | not run | not run |
| dev compile on a first request > late only because the dev server compiled its code: a note that says so | Unit | pass | not run | not run | not run |
| dev compile on a first request > slow module: the compile named | Unit | pass | not run | not run | not run |
| first_difference > ignores re-anchored block markers and finds the visible change | Unit | pass | not run | not run | not run |
| first_difference > ignores the runtime's own marks on a nested island, and finds the real change past them | Unit | pass | not run | not run | not run |
| forced layout > the CPU trace's place, the island named once when the time is its own code | Unit | pass | not run | not run | not run |
| forced layout > the runtime task is put on the island whose hydration overlaps it most; a page script by its file | Unit | pass | not run | not run | not run |
| forced layout > under 30 ms for each: quiet | Unit | pass | not run | not run | not run |
| images far below the first screen that loaded at start > names each file once (×N for copies), how far down, the island; biggest first | Unit | pass | not run | not run | not run |
| images far below the first screen that loaded at start > the ones whose download overlapped a slow hero are named in its LCP split | Unit | pass | not run | not run | not run |
| images far below the first screen that loaded at start > under 100 KB in all: quiet | Unit | pass | not run | not run | not run |
| images sent far bigger than shown > a small total waste is quiet | Unit | pass | not run | not run | not run |
| images sent far bigger than shown > names the image, its sizes and the bytes nobody sees; the biggest waste first | Unit | pass | not run | not run | not run |
| images the browser could hold no room for > a note; a warning once the page moved | Unit | pass | not run | not run | not run |
| kept out of the back/forward cache > names who adds an 'unload' listener, and the browser's reasons when Back did not restore | Unit | pass | not run | not run | not run |
| kept out of the back/forward cache > the profiler's run saw the page answer no-store: said, with or without an unload listener | Unit | pass | not run | not run | not run |
| listeners that hold scrolling > names each with its owner, event and element; passive: false said | Unit | pass | not run | not run | not 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 quiet | Unit | pass | not run | not run | not 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 name | Unit | pass | not run | not run | not run |
| preloaded, never used > names each file, what it is, and why nothing used it | Unit | pass | not run | not run | not run |
| rate > uses the web-vitals lines | Unit | pass | not run | not run | not run |
| scrolling stalled > a frame or two of 60 ms: quiet | Unit | pass | not run | not run | not run |
| scrolling stalled > names the frames, the worst, and the script that held them most with what ran it | Unit | pass | not run | not run | not run |
| text kept invisible by its font > a font-display auto face whose file landed after the first paint; swap, or early, quiet | Unit | pass | not run | not run | not 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 it | Unit | pass | not run | not run | not run |
| text sent uncompressed > names each file, its kind and size; a warning past 100 KB | Unit | pass | not run | not run | not run |
| text sent uncompressed > the page's own HTML, first | Unit | pass | not run | not run | not run |
| text sent uncompressed > under 20 KB in all, or on the dev server: nothing | Unit | pass | not run | not run | not 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, quiet | Unit | pass | not run | not run | not 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 not | Unit | pass | not run | not run | not 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's | Unit | pass | not run | not run | not run |
| the font the largest paint waited for > the LCP's split and parts carry the font wait | Unit | pass | not run | not run | not run |
| the largest paint marked lazy > named, with its file and island; a largest paint without it quiet | Unit | pass | not run | not run | not run |
| without_comments > drops every comment and keeps the rest | Unit | pass | not run | not run | not run |
| without_runtime_marks > drops only the empty marks the runtime sets | Unit | pass | not run | not run | not run |
packages/insights/test/devtools-third-party.test.ts | |||||
| a browser that hides other origins' sizes: scripts counted, never called 0 KB | Unit | pass | not run | not run | not run |
| an awake island with an empty children slot is named | Unit | pass | not run | not run | not run |
| by origin: kinds, bytes, blocking, runtime-loaded, main-thread time | Unit | pass | not run | not run | not run |
| findings: the heaviest with a fix per kind, the blocking origin, the island a third party could have edited | Unit | pass | not run | not run | not run |
packages/insights/test/hydration-attr-changes.test.ts | |||||
| apply_attr_rules > a removed attribute is matched by its old value | Unit | pass | not run | not run | not run |
| apply_attr_rules > by tag, name and new value; exact strings and patterns | Unit | pass | not run | not run | not run |
| apply_attr_rules > no rules: nothing ignored | Unit | pass | not run | not run | not run |
| attr_changes > a changed value | Unit | pass | not run | not run | not run |
| attr_changes > each attribute a custom element set, added, removed or changed | Unit | pass | not run | not run | not run |
| attr_changes > text or elements that differ are not attributes only | Unit | pass | not run | not run | not run |
| attr_changes > the same attributes in another order: attributes only, nothing to name | Unit | pass | not run | not run | not run |
packages/insights/test/profiler-page-assets.test.ts | |||||
| import scanners > static imports of bundled output, not dynamic ones or look-alikes | Unit | pass | not run | not run | not run |
| Kit route nodes > the ogygia runtime's on-demand parts are its own, loaded later (with what they import) | Unit | pass | not run | not run | not run |
| Kit route nodes > the page's own node (reachable only by app.js's dynamic import) is weighed; other routes' are not | Unit | pass | not run | not run | not run |
| runtime_scripts > this app's island entries no HTML named (a hole's islands) are counted apart; a CDN's parts are not | Unit | pass | not run | not run | not run |
| scan_assets > attributes: quoted, unquoted, valueless, entities | Unit | pass | not run | not run | not run |
| scan_assets > finds every file the document loads at start, with what blocks | Unit | pass | not run | not run | not 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)#1370 | Unit | pass | not run | not run | not run |
| scan_assets > tags are read as a browser reads them: a quoted `>`, an upper-case close | Unit | pass | not run | not run | not 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 not | Unit | pass | not run | not run | not run |
| weigh_assets > weighs every file, follows static imports, keeps lazy islands apart | Unit | pass | not run | not run | not run |
packages/insights/test/svelte-warnings.test.ts | |||||
| the finding groups them and names the island when it knows it | Unit | pass | not run | not run | not run |