Tests / @ogygia/rewrite
@ogygia/rewrite
commit
31530eff 243 test runs (243 tests, each run in Node, the browsers or both)
1.29× lines of test for each line of source (4,553 to 3,517) 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)95.7% of source lines run by the tests
- 122Unit
- 113Browser
- 8End to end
- 0Type tests
- 0Lint rules
- 0Failing
Coverage
- 95.7%Lines
- 89.3%Branches
- 90.7%Functions
- 94.3%Statements
Every test
243 tests
| Test | Kind | Node | Chromium | Firefox | WebKit |
|---|---|---|---|---|---|
../../../../../__w/ogygia/ogygia/packages/rewrite/e2e/restore.spec.ts | |||||
| a first-load copy reaching the router (a store, a prerender, a cache that ignores Vary) is loaded, never swapped in | End to end | not run | pass | pass | pass |
| a hole’s answer arrives restored, and its island hydrates after | End to end | not run | pass | pass | pass |
| a page with nothing reshaped carries no restorer; its hole’s answer still arrives restored | End to end | not run | pass | pass | pass |
| a router navigation away and back: every restored host has its sheet, and nothing throws | End to end | not run | pass | pass | pass |
| a router navigation morphs a server-owned host its own runtime unpacked, without the transform’s tree in its light DOM | End to end | not run | pass | pass | pass |
| a router-fetched page is rendered as an answer: every host planned, and the response varies on it | End to end | not run | pass | pass | pass |
| og-handoff="replace" through the real runtime: the document’s host, a hole answer’s host already defined, and a router page’s host each end with the component’s render alone, and a classic head listener hears each | End to end | not run | pass | pass | pass |
| the island inside a reshaped host hydrates as is, and stays interactive | End to end | not run | pass | pass | pass |
packages/rewrite/test/browser-chunk-lost/client-restorer-lost.test.ts | |||||
| a restorer that does not load is said, and the answers waiting for it go on | Browser | not run | pass | pass | pass |
packages/rewrite/test/browser-chunk-lost/restore-report.test.ts | |||||
| a restore report whose wording chunk does not load says nothing, throws nothing, and keeps the log | Browser | not run | pass | pass | pass |
packages/rewrite/test/browser/client-restorer.test.ts | |||||
| a page whose document carried the restorer uses that one and loads none | Browser | not run | pass | pass | pass |
| a page with elements whose ids are __og_restore and __og_restore_adopt loads the realm’s restorer, and an answer restores and adopts | Browser | not run | pass | pass | pass |
| a page with no restorer of its own loads the realm’s after the boot, and an answer parsed first waits for it | Browser | not run | pass | pass | pass |
| an answer parsed before the realm’s restorer is in waits for it and comes out restored, though another script swapped window.Promise after the boot | Browser | not run | pass | pass | pass |
| the realm’s restorer gives the page its __og_carry before the first answer is morphed: the copy hears ogygia:restored | Browser | not run | pass | pass | pass |
packages/rewrite/test/browser/handoff.test.ts | |||||
| a bare or empty og-handoff is adopt, logged with its empty value once per element name, and said with its code | Browser | not run | pass | pass | pass |
| a component that always calls attachShadow() in its constructor, ALREADY defined when the morph places its hole answer: it gets the restored root emptied, with its sheets, and nothing throws | Browser | not run | pass | pass | pass |
| a component that always calls attachShadow() in its constructor, defined after a hole answer the morph placed: its root is the restored one, emptied, and nothing throws | Browser | not run | pass | pass | pass |
| a late host ignores og-handoff: the component’s own root is left as it made it, and the attribute goes | Browser | not run | pass | pass | pass |
| a page sheet a region answer carries inline goes to the head at the restore’s first step, and a host of the answer that names it adopts it | Browser | not run | pass | pass | pass |
| a page with an element named after each of the restorer’s data globals: the report, the restore of the page, an answer’s restore and the morph that places it all work | Browser | not run | pass | pass | pass |
| a page with an element whose id is __og_carry: the restorer installs its own over it, and the morph’s copy of a host hears ogygia:restored | Browser | not run | pass | pass | pass |
| a sheet’s media applies to the roots that adopt it: a print sheet does not paint on screen, adopted or as a <style> copy | Browser | not run | pass | pass | pass |
| adopt (no og-handoff, as before): the same component renders next to the server’s tree, which stays and shows twice | Browser | not run | pass | pass | pass |
| adopt in a hole answer the morph places: the copy hears ogygia:restored once, the original never | Browser | not run | pass | pass | pass |
| an answer restored but never placed goes 30 s after its restore, though no restore_adopt() ran in between | Browser | not run | pass | pass | pass |
| an incoming page restored while a hole answer’s restore_adopt() runs before it goes in (the router awaits between): its hosts keep waiting, and swapped in they get their sheets and ogygia:restored | Browser | not run | pass | pass | pass |
| an incoming page restored while a hole answer’s restore_adopt() runs before it goes in: morphed in, its copies get their sheets and ogygia:restored, in restore order | Browser | not run | pass | pass | pass |
| an og-handoff value neither adopt nor replace is adopt, logged and said with its code once per element name and value | Browser | not run | pass | pass | pass |
| an og-shadow key may name a page sheet (`<style data-og-head>`): the root adopts it; a key with no sheet at all is still logged | Browser | not run | pass | pass | pass |
| nested hosts in a hole answer the morph places: their copies hear ogygia:restored in restore order, innermost first | Browser | not run | pass | pass | pass |
| ogygia:restored for an answer never inserted is dropped after 30 s, like its roots | Browser | not run | pass | pass | pass |
| ogygia:restored for an answer: not during the restore of its inert fragment, but at restore_adopt() once it is in the page | Browser | not run | pass | pass | pass |
| ogygia:restored is composed: a host inside a declarative shadow root the page shipped is heard on the document | Browser | not run | pass | pass | pass |
| ogygia:restored is not heard for a late host or one that cannot have a root | Browser | not run | pass | pass | pass |
| ogygia:restored: once per restored host, after every host of the restore is done (nested ones too), in restore order, with its root | Browser | not run | pass | pass | pass |
| ogygia:restored: the root its listener gets has its sheets already, in the page and for an answer | Browser | not run | pass | pass | pass |
| replace in a hole answer inserted as it is, its element already defined and writing as it connects: the server’s tree goes | Browser | not run | pass | pass | pass |
| replace in a hole answer the morph places, its element already defined and writing as it connects: the server’s tree goes, and ogygia:restored sees the component’s render alone | Browser | not run | pass | pass | pass |
| replace in a hole answer the morph places: the copy of the host hears ogygia:restored, and its server tree goes at the first write | Browser | not run | pass | pass | pass |
| replace in an answer restored in its inert fragment: inserted, adopted, then the component defined, the server’s tree goes at its first write | Browser | not run | pass | pass | pass |
| replace in an incoming page swapped in whole, its element already defined and writing as it connects: the server’s tree goes | Browser | not run | pass | pass | pass |
| replace in an incoming page the router morphs in: the copy hears ogygia:restored, and its server tree goes at the first write | Browser | not run | pass | pass | pass |
| replace with fallback <style> sheets (no adoptable sheets): the server’s tree goes, the sheets stay | Browser | not run | pass | pass | pass |
| replace, nested: an element defined before the restore that renders during ANOTHER host’s ogygia:restored listener hands off | Browser | not run | pass | pass | pass |
| replace, siblings: an element defined before the restore that renders during ANOTHER host’s ogygia:restored listener hands off | Browser | not run | pass | pass | pass |
| replace, the limit: a listener that defines the element, whose component writes as it connects: that write is the listener’s, and the server’s tree stays | Browser | not run | pass | pass | pass |
| replace, the limit: an element defined before the restore whose listener makes it render during the event: that render is the listener’s, and the server’s tree stays | Browser | not run | pass | pass | pass |
| replace: a component that already cleared the server’s tree itself (replaceChildren) upgrades with no error and keeps what it wrote | Browser | not run | pass | pass | pass |
| replace: a component that renders into the root it finds replaces the server’s tree at its first write, before the next task; the sheets stay, the light DOM stays Svelte’s | Browser | not run | pass | pass | pass |
| replace: a listener that adds a node and defines an element whose component renders later: the node is the listener’s, and the server’s tree stays until the component’s first write | Browser | not run | pass | pass | pass |
| replace: a listener that defines the element after the event (queueMicrotask), whose component writes as it connects: the server’s tree goes | Browser | not run | pass | pass | pass |
| replace: a node a listener inserts before the upgrade is no handoff; the first write after it is, and the listener’s node stays | Browser | not run | pass | pass | pass |
| replace: a node an ogygia:restored listener adds is never the component’s, even when the element is defined in the same task | Browser | not run | pass | pass | pass |
| replace: a node another script adds to the root while the element is not defined is no handoff; the component’s first write once defined is | Browser | not run | pass | pass | pass |
| replace: an element defined before the restore that renders during an EARLIER host’s ogygia:restored listener, its own event still to come, hands off | Browser | not run | pass | pass | pass |
| replace: an element defined before the restore whose listener makes it render after the event (queueMicrotask): the server’s tree goes | Browser | not run | pass | pass | pass |
| replace: on an element defined before the restore (its component makes its root later), a listener’s node leaves the server’s tree; the component’s own render replaces it | Browser | not run | pass | pass | pass |
| replace: the observer goes at the handoff; a server node put back after it is never removed | Browser | not run | pass | pass | pass |
| the copy’s handoff names the copies of the server nodes still in the root at the copy: one already gone stays gone, a node another added stays | Browser | not run | pass | pass | pass |
| the morph keeps the live host of a second answer: that answer’s record waits with no event, and goes after 30 s | Browser | not run | pass | pass | pass |
packages/rewrite/test/browser/host-classes.test.ts | |||||
| a token the component dropped on the client before the hydrate stays dropped | Browser | not run | pass | pass | pass |
| an element hydration replaced gets nothing put back: the element left the page | Browser | not run | pass | pass | pass |
| Svelte’s own tokens are never put back; unrestored and replaced elements are left alone | Browser | not run | pass | pass | pass |
| the component’s tokens as they are just before the hydrate come back after Svelte’s write | Browser | not run | pass | pass | pass |
| through a real Svelte hydrate: the class write happens, and the component’s token survives it | Browser | not run | pass | pass | pass |
packages/rewrite/test/browser/inert-parse.test.ts | |||||
| a host that cannot have a shadow root is said once per page and host tag, with its code | Browser | not run | pass | pass | pass |
| a parsed answer builds none of its custom elements, in this engine (#382)#382 | Browser | not run | pass | pass | pass |
| a shadow sheet a host names but the page lacks is said once per key, with its code | Browser | not run | pass | pass | pass |
| every parse is checked: an answer with a built custom element breaks rule_parse_upgraded | Browser | not run | pass | pass | pass |
| production: a late restore is said once per page and host tag, with its code | Browser | not run | pass | pass | pass |
| under the Firefox 159 model, an answer stays inert, and its host is restored, never late (#382)#382 | Browser | not run | pass | pass | pass |
packages/rewrite/test/browser/restore.test.ts | |||||
| a component that attaches its own root in its constructor upgrades over a restored host: the root comes back emptied, the light DOM stays Svelte’s | Browser | not run | pass | pass | pass |
| a csr=false page arms no class watch (the island hydrate puts the tokens back) | Browser | not run | pass | pass | pass |
| a custom element keeps the class tokens its render added beside Svelte’s (recorded for the hydrate); a plain element gets Svelte’s alone | Browser | not run | pass | pass | pass |
| a declarative shadow root parsed in an inert fragment gets the page’s registry after insertion (no transform needed) | Browser | not run | pass | pass | pass |
| a dev check that does not parse checks nothing: the restore goes on, and the script is consumed | Browser | not run | pass | pass | pass |
| a DOM without adoptable sheets or CSS.escape (jsdom): a <style> per root | Browser | not run | pass | pass | pass |
| a host its component already upgraded (no root of its own yet) keeps its identity and gets the restored root | Browser | not run | pass | pass | pass |
| a host that cannot have a shadow root is skipped and said; the hosts after it are restored | Browser | not run | pass | pass | pass |
| a host that names a shadow sheet the page does not carry is recorded, and its other sheets still adopted | Browser | not run | pass | pass | pass |
| a host upgraded before the restore reached it keeps its own root; the light DOM is put back, the server’s tree dropped, and it says so | Browser | not run | pass | pass | pass |
| a host whose tag name holds markup characters is restored with nothing parsed out of its name | Browser | not run | pass | pass | pass |
| a host with an attribute name only the HTML parser accepts (`=eq`) is restored, and so is every host after it | Browser | not run | pass | pass | pass |
| a host’s attribute reset (`og-r`) never sets a data: URL, which html.ts refuses too | Browser | not run | pass | pass | pass |
| a host’s attribute reset (`og-r`) never sets an on* handler or a javascript: URL | Browser | not run | pass | pass | pass |
| a Kit-hydrated page: a watched host that leaves the document leaves the watch, a moved one stays, and the observer goes with the last one | Browser | not run | pass | pass | pass |
| a Kit-hydrated page: the first whole write to Svelte’s tokens gets back what it dropped; the component’s own later removals stand | Browser | not run | pass | pass | pass |
| a mangled attribute reset (`og-r`) leaves the host’s attributes as served, and its mark gone | Browser | not run | pass | pass | pass |
| a missing shadow sheet named by many hosts is logged once per key, and the log keeps room for what comes after | Browser | not run | pass | pass | pass |
| a planned host inside a declarative shadow root the page shipped is restored too | Browser | not run | pass | pass | pass |
| a root restored in an answer’s inert fragment gets the page’s registry after insertion: what is inside upgrades | Browser | not run | pass | pass | pass |
| a root that cannot adopt its sheet leaves the others in the answer theirs | Browser | not run | pass | pass | pass |
| a router swap: a root the swap left in the parsed page is skipped (it waits, and goes after 30 s), and every root in this one gets its sheets | Browser | not run | pass | pass | pass |
| a stand-in becomes only a tag the server pass writes as one, without on* attributes | Browser | not run | pass | pass | pass |
| a stand-in keeps the parser from splitting the page’s link, and becomes a real <a> in the tree | Browser | not run | pass | pass | pass |
| a stand-in with an attribute name only the HTML parser accepts (`=eq`) becomes its tag, and so does every stand-in after it (#1775)#1775 | Browser | not run | pass | pass | pass |
| a text mark whose original does not parse carries none: the text stays as served, the mark gone | Browser | not run | pass | pass | pass |
| an answer restored in its inert fragment: a component that attaches its own root upgrades at insertion over the emptied root | Browser | not run | pass | pass | pass |
| an answer still waiting for its stylesheet keeps its roots while another answer goes in | Browser | not run | pass | pass | pass |
| an answer’s fragment: restored before insertion, its sheets adopted once the host is in the page | Browser | not run | pass | pass | pass |
| dev: the check compares each restored host with Svelte’s children, and names the first difference | Browser | not run | pass | pass | pass |
| every dev check under the root is read and consumed: a restore of a streamed page checks the hosts of every chunk, and a second restore finds nothing (found by the rewrite sim) | Browser | not run | pass | pass | pass |
| putting attributes back never adds an event handler, a srcdoc or a javascript: URL | Browser | not run | pass | pass | pass |
| self-contained: the function source runs on its own (the handle inlines it) | Browser | not run | pass | pass | pass |
| Svelte’s children put back into a host are known render output (a later morph may remove one) | Browser | not run | pass | pass | pass |
| text a render trimmed inside a custom element it did not render comes back through the planned host above | Browser | not run | pass | pass | pass |
| the dev check reads class as tokens and style as declarations, an empty one as absent | Browser | not run | pass | pass | pass |
| the document: a shadow root with the tree, Svelte’s children back exactly, the host’s attributes back | Browser | not run | pass | pass | pass |
| the restorer swaps back every tag the server pass may write as a stand-in | Browser | not run | pass | pass | pass |
packages/rewrite/test/browser/rewrite-sim.test.ts | |||||
| a seeded swarm of streamed pages through two failing rewrites restores what Svelte rendered, says every failure, and restores once | Browser | not run | pass | pass | pass |
| region answers: every host restored in the fragment, nothing left, idempotent | Browser | not run | pass | pass | pass |
packages/rewrite/test/browser/rewrite.test.ts | |||||
| check(): a document, its restored hosts compared with Svelte’s | Browser | not run | pass | pass | pass |
| check(): a region answer restored in a DOM, every host exactly Svelte’s | Browser | not run | pass | pass | pass |
| check(): a render that changes Svelte’s children is named in mismatches | Browser | not run | pass | pass | pass |
| check(): leaves no trace in the page (no sheet in its cache, no log entry, no head asset, no queued root, no carry hook), and still reports its mismatches | Browser | not run | pass | pass | pass |
| check(): the roots it restores in its own documents leave no entry in the page’s queues | Browser | not run | pass | pass | pass |
| chunk by chunk: the first chunk’s restorer and each later chunk’s call restore exactly their hosts, sheets found inline | Browser | not run | pass | pass | pass |
packages/rewrite/test/browser/script-url.test.ts | |||||
| the script-URL table in the restorer > as a module: an attribute reset sets every value but the script URLs | Browser | not run | pass | pass | pass |
| the script-URL table in the restorer > inline, as the page runs it: an attribute reset sets every value but the script URLs | Browser | not run | pass | pass | pass |
| the script-URL table in the restorer > this browser’s URL parser says what the table says | Browser | not run | pass | pass | pass |
packages/rewrite/test/check-jsdom.test.ts | |||||
| a replace-handoff root that changes under jsdom keeps the server tree, with no error from its observer | Unit | pass | not run | not run | not run |
| check() of a csr document restores its host under jsdom | Unit | pass | not run | not run | not run |
| check() of a region restores its host under jsdom | Unit | pass | not run | not run | not run |
| the pinned jsdom still throws matching :defined in a windowless document, so these tests still prove the catch | Unit | pass | not run | not run | not run |
packages/rewrite/test/plugin.test.ts | |||||
| a rewrite() handle > gives a pass to the requests it wrapped, and to no other | Unit | pass | not run | not run | not run |
| a rewrite() handle > listed after ogygia.handle() is refused with rewrite_after_ogygia | Unit | pass | not run | not run | not run |
| a rewrite() handle > refuses every request while rewrite() is not in vite.config, naming the fix | Unit | pass | not run | not run | not run |
| a rewrite() handle > several in sequence share one pass, in the order they ran | Unit | pass | not run | not run | not run |
| a rewrite() handle > wrapped in a conditional handle, it rewrites the requests the condition picks and leaves every other request untouched | Unit | pass | not run | not run | not run |
| core's handle > refuses `transform`, pointing at @ogygia/rewrite | Unit | pass | not run | not run | not run |
| rewrite() in vite.config > takes no options, is named by its package and names its realms, the modules beside it | Unit | pass | not run | not run | not run |
packages/rewrite/test/restore-happy-dom.test.ts | |||||
| a list of waiting roots the window only inherits is not the restorer’s: an incoming page’s root waits in a list of the window’s own | Unit | pass | not run | not run | not run |
| a live restore runs in a DOM with no customElements global | Unit | pass | not run | not run | not run |
| a page element named after each of the restorer’s data globals, which happy-dom makes an own property of the window, leaves the restore of the page and of an answer working | Unit | pass | not run | not run | not run |
| a restore runs, and its roots wait, in a browser with no Object.hasOwn (Safari before 15.4) | Unit | pass | not run | not run | not run |
| an answer parsed while happy-dom holds a page element named __og_restore_ready (no restorer on the page) waits for nothing and throws nothing; the restorer’s log is empty | Unit | pass | not run | not run | not run |
packages/rewrite/test/restorer-inline-safe.test.ts | |||||
| the inlined restorer > is one script element whose text holds no </script and no <!-- | Unit | pass | not run | not run | not run |
packages/rewrite/test/restorer-size.test.ts | |||||
| the inlined restorer > a later chunk’s restore is one short call | Unit | pass | not run | not run | not run |
| the inlined restorer > minified as the build does, stays inside its budget: 11.1 kB, 3.95 kB brotli | Unit | pass | not run | not run | not run |
packages/rewrite/test/reversible-browser-read.test.ts | |||||
| mark reads tags as the browser does > a comment ends at `--!>` and `<!-->` too | Unit | pass | not run | not run | not run |
| mark reads tags as the browser does > a host inside a noscript is text, not an element | Unit | pass | not run | not run | not run |
| mark reads tags as the browser does > a quote inside an unquoted value does not hide the host after it | Unit | pass | not run | not run | not run |
| mark reads tags as the browser does > a region’s attributes in any quoting place its hosts | Unit | pass | not run | not run | not run |
packages/rewrite/test/reversible.test.ts | |||||
| a page tag that closes a custom element around it > is the page’s, not the render’s: settle never makes it a stand-in (found by the round-trip fuzz) | Unit | pass | not run | not run | not run |
| closes_all > refuses HTML that would take in the page after it, or close an element around it | Unit | pass | not run | not run | not run |
| closes_all > takes HTML that closes what it opens, implied closes and voids included | Unit | pass | not run | not run | not run |
| localize_marks > gives back the same string when the marks already count from 0 | Unit | pass | not run | not run | not run |
| localize_marks > reads back ids a serializer requoted | Unit | pass | not run | not run | not run |
| localize_marks > renumbers a block’s marks from 0 for a cache key, and puts the document’s ids back after | Unit | pass | not run | not run | not run |
| mark > a baked live region is opaque like a lake: on a Kit-hydrated document its hosts get no plan, its islands keep theirs | Unit | pass | not run | not run | not run |
| mark > a document the router fetched is an answer: every host planned, as in a region answer | Unit | pass | not run | not run | not run |
| mark > a Kit-hydrated document is Svelte-owned throughout its body; a region answer plans every host | Unit | pass | not run | not run | not run |
| mark > a server-owned host around a hole is planned: ogygia swaps the hole, its runtime must not adopt it | Unit | pass | not run | not run | not run |
| mark > marks text a trimmer could change, deeper inside a planned host’s children — never the first text of a <pre> | Unit | pass | not run | not run | not run |
| mark > plans the hosts in Svelte-owned markup and around it; tags every custom element’s children | Unit | pass | not run | not run | not run |
| restored_ids > reads og-h however a serializer quotes it | Unit | pass | not run | not run | not run |
| settle > a block the tree opens inside a Svelte <p> becomes a stand-in too | Unit | pass | not run | not run | not run |
| settle > a host ogygia will not restore gets no comment marks (its element children still carry their tag) | Unit | pass | not run | not run | not run |
| settle > a host without a plan loses every mark: left exactly as the transform wrote it | Unit | pass | not run | not run | not run |
| settle > a planned host keeps what the restorer needs: the attributes to reset, the text the render changed | Unit | pass | not run | not run | not run |
| settle > a planned host that is also a tagged child carries one attribute reset: its own | Unit | pass | not run | not run | not run |
| settle > a tagged child that is a host ogygia won’t restore keeps the attributes its runtime adopts it by | Unit | pass | not run | not run | not run |
| settle > dev: each planned host’s original children, for the browser’s check | Unit | pass | not run | not run | not run |
| settle > head assets in a document’s body go to its head, once per key | Unit | pass | not run | not run | not run |
| settle > settle alone drops marks of hosts the transform never planned | Unit | pass | not run | not run | not run |
| settle > stand-ins: a start tag the parser would restructure, where the render made either side of it | Unit | pass | not run | not run | not run |
packages/rewrite/test/rewrite-fuzz.test.ts | |||||
| a render that only adds beside each element > leaves every other byte as it was: marks, settle and splice undo each other (csr false, answer false) | Unit | pass | not run | not run | not run |
| a render that only adds beside each element > leaves every other byte as it was: marks, settle and splice undo each other (csr false, answer true) | Unit | pass | not run | not run | not run |
| a render that only adds beside each element > leaves every other byte as it was: marks, settle and splice undo each other (csr true, answer false) | Unit | pass | not run | not run | not run |
| an identity render > gives any markup, cut anywhere, back byte for byte (csr false, answer false) | Unit | pass | not run | not run | not run |
| an identity render > gives any markup, cut anywhere, back byte for byte (csr false, answer true) | Unit | pass | not run | not run | not run |
| an identity render > gives any markup, cut anywhere, back byte for byte (csr true, answer false) | Unit | pass | not run | not run | not run |
packages/rewrite/test/rewrite.test.ts | |||||
| .check() > lists failures, counts restored hosts, and has no DOM in node | Unit | pass | not run | not run | not run |
| buggify points: each way a render fails, drawn by the simulator > rewrite.chunk-split: a chunk read as two, cut inside an element, ships that element unrendered and says so | Unit | pass | not run | not run | not run |
| buggify points: each way a render fails, drawn by the simulator > rewrite.render-count: a batch one result short is retried one at a time, and an element whose own answer is short goes out as ogygia rendered it | Unit | pass | not run | not run | not run |
| buggify points: each way a render fails, drawn by the simulator > rewrite.render-malformed: a result that does not close what it opens goes out as ogygia rendered it | Unit | pass | not run | not run | not run |
| buggify points: each way a render fails, drawn by the simulator > rewrite.render-strips-marks: a result without the og-h of a host ogygia restores goes out as ogygia rendered it | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a batch with the wrong count is retried one at a time | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a cancelled request: the batch is shipped as is, never retried, nothing said | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a failed batch is retried one element at a time; one that drops the marks goes out as ogygia rendered it (rewrite_marks_lost) | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a failed batch is retried one element at a time; one that returns a bad sheet goes out as ogygia rendered it (rewrite_element_failed) | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a failed batch is retried one element at a time; one that returns html that does not close goes out as ogygia rendered it (rewrite_element_failed) | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a failed batch is retried one element at a time; one that returns no html goes out as ogygia rendered it (rewrite_element_failed) | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a failed batch is retried one element at a time; one that throws goes out as ogygia rendered it (rewrite_element_failed) | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a later chunk of a cancelled request goes out as it came, never rendered | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a request cancelled during the first rewrite: the second never renders, and nothing is written | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > a request cancelled while the elements are retried one at a time: shipped as is, nothing said, and no element’s render starts after the cancel (found by the long rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > production says each failure with its code, once per response and element name | Unit | pass | not run | not run | not run |
| element rewrites: failures cost only the element > rule_rewrite_after_cancel: a render called after the request was cancelled is said with the rule’s code | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a chunk that ends inside a region or a tag carries no script: the restore waits for a chunk that ends where one may go | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a chunk-1 meta or sheet never lands inside an island: the first-load mark goes before the element it is for (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a later chunk: its sheet inline at first use, once per key, and one restore call at its end | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a later chunk's host inside a declarative shadow root the page opened, in that chunk or an earlier one, gets the restore call that enters every root (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a matched element whose start tag a chunk boundary cuts (after "<", in a chunk with no match before it) is said as split, as one its chunk ends inside (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a matched element whose start tag a chunk boundary cuts (after "<dem", in a chunk with no match before it) is said as split, as one its chunk ends inside (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a matched element whose start tag a chunk boundary cuts (after "<demo-", in a chunk with no match before it) is said as split, as one its chunk ends inside (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a matched element whose start tag a chunk boundary cuts (after "<demo-ca", in a chunk with no match before it) is said as split, as one its chunk ends inside (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a matched element whose start tag a chunk boundary cuts (after "<demo", in a chunk with no match before it) is said as split, as one its chunk ends inside (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a region whose start tag is cut by a chunk boundary (after "<") still owns its elements (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a region whose start tag is cut by a chunk boundary (after "<ogygia-region entry") still owns its elements (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > a region whose start tag is cut by a chunk boundary (after "<ogygia-region") still owns its elements (found by the rewrite sim) | Unit | pass | not run | not run | not run |
| element rewrites: the restore > an element split across chunks goes out unrendered, said once, and the rest is read after it | Unit | pass | not run | not run | not run |
| element rewrites: the restore > the chunk that restored something carries the restorer before </body>; its sheets go to the head | Unit | pass | not run | not run | not run |
| element rewrites: the restore > the last chunk carries a restore still waiting, wherever it ends | Unit | pass | not run | not run | not run |
| element rewrites: what goes to render > a custom element outside Svelte-owned markup is rendered, not restored | Unit | pass | not run | not run | not run |
| element rewrites: what goes to render > a page with no match goes out byte for byte, render is never called, and no restorer ships | Unit | pass | not run | not run | not run |
| element rewrites: what goes to render > a render the page around its element would restructure goes out as a stand-in: a <div> in the page’s <p>, an <a> in the page’s <a> (the restore lab e2e) | Unit | pass | not run | not run | not run |
| element rewrites: what goes to render > only the outermost match goes, with marks numbered from 0, and equal elements render once | Unit | pass | not run | not run | not run |
| element rewrites: what goes to render > text that spells a mark is text: moving ids never touches it, and render sees it as written (found by the fuzz) | Unit | pass | not run | not run | not run |
| element rewrites: what goes to render > the context carries kind, csr, url, event and a signal that fires when the request is cancelled | Unit | pass | not run | not run | not run |
| element rewrites: what goes to render > the ids of a response keep counting past each element, so marks never collide | Unit | pass | not run | not run | not run |
| og-handoff > on a host without a plan it is taken off with the other marks | Unit | pass | not run | not run | not run |
| og-handoff > on a planned host it goes to the restorer, and is never in the attribute reset | Unit | pass | not run | not run | not run |
| region answers > every host is restored; sheets go inline for the runtime to hoist | Unit | pass | not run | not run | not run |
| several rewrites > run in order on one marking: the second sees the first one’s output, marks intact | Unit | pass | not run | not run | not run |
| sheet attributes > .check() lists an element whose sheet attribute was refused | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: ["media"] | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"a b":"1"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"data-og-head":"k2"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"data-ogygia-region-css":"1"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"DATA-OGYGIA-X":"1"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"is":"x-style"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"media":1} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"og-h":"0"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"ogygia-x":"1"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"ONERROR":"x"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"onload":"x"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"shadowrootmode":"open"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"x\"><script>":"1"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"xmlns-x":"urn:x"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"xmlns:x":"urn:x"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"xmlns":"urn:x"} | Unit | pass | not run | not run | not run |
| sheet attributes > a sheet attribute that cannot be written fails its element with the reason: {"XMLNSX":"urn:x"} | Unit | pass | not run | not run | not run |
| sheet attributes > are written on the sheet’s tag after its key, values escaped, on a page <style> and a shadow <template> alike | Unit | pass | not run | not run | not run |
| sheet attributes > the first sheet of a key wins, attributes and all | Unit | pass | not run | not run | not run |
| the page form > .html(str) runs the page function on a plain string, outside any request | Unit | pass | not run | not run | not run |
| the page form > a page function that throws: production sends the document as ogygia rendered it, said as rewrite_page_failed | Unit | pass | not run | not run | not run |
| the page form > a request cancelled while the page function ran: the document goes out as ogygia rendered it | Unit | pass | not run | not run | not run |
| the page form > dev throws it | Unit | pass | not run | not run | not run |
| the page form > holds the document until its last chunk and rewrites it whole | Unit | pass | not run | not run | not run |
packages/rewrite/test/types.test.ts | |||||
| rewrite() > an element rewrite is a Kit handle with .check(); a page rewrite also has .html() | Unit | pass | not run | not run | not run |
| rewrite() > render gets the elements and the context, and gives one result per element, sync or async | Unit | pass | not run | not run | not run |