Tests / @ogygia/federation
@ogygia/federation
Version 0.13.1
4b18f465 65 test runs (65 tests, each run in Node, the browsers or both)
1.14× lines of test for each line of source (2,121 to 1,855) 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)75.8% of source lines run by the tests
- 65Unit
- 0Browser
- 0End to end
- 0Type tests
- 0Lint rules
- 0Failing
Coverage
- 75.8%Lines
- 62.5%Branches
- 78.6%Functions
- 71.8%Statements
Every test
End-to-end suites are not part of this report yet.
65 tests
| Test | Kind | Node | Chromium | Firefox | WebKit |
|---|---|---|---|---|---|
packages/federation/test/federation.test.ts | |||||
| cross-app thaw > peer.drop evicts cached documents by their adopted tags | Unit | pass | not run | not run | not run |
| deferred remote holes — the lifetime and renewal of a local hole > an expired hole is answered as an expired local one, and the runtime’s renewal re-signs it | Unit | pass | not run | not run | not run |
| deferred remote holes — the lifetime and renewal of a local hole > answers a live hole with the fragment | Unit | pass | not run | not run | not run |
| deferred remote holes — the lifetime and renewal of a local hole > expires in SECONDS, by the app’s rule: the `ttl` window, or the life of the deploy on a stored page | Unit | pass | not run | not run | not run |
| deferred remote holes — the lifetime and renewal of a local hole > refuses a forged hole and a renewal of one that has not expired | Unit | pass | not run | not run | not run |
| Ed25519 signing / verification > a second authorized key still verifies (rotation / multi-caller) | Unit | pass | not run | not run | not run |
| Ed25519 signing / verification > accepts a fresh, correctly-signed request once and returns its claims | Unit | pass | not run | not run | not run |
| Ed25519 signing / verification > AUDIENCE BINDING: a hop signed for cms.test is rejected at dash.test (same key) | Unit | pass | not run | not run | not run |
| Ed25519 signing / verification > NaN timestamp does not bypass the freshness gate | Unit | pass | not run | not run | not run |
| Ed25519 signing / verification > REPLAY: a byte-identical second delivery is rejected | Unit | pass | not run | not run | not run |
| Ed25519 signing / verification > tampered claims (re-encoded x-og-user) break the signature | Unit | pass | not run | not run | not run |
| federate() — registration + fail-closed > returns typed peer handles keyed by name | Unit | pass | not run | not run | not run |
| federate() — registration + fail-closed > warns when it exposes but no peer has a key (and not with `open`) | Unit | pass | not run | not run | not run |
| lift_document — an app’s full HTML → the wire shape > a graph that is not an object passes through as it came | Unit | pass | not run | not run | not run |
| lift_document — an app’s full HTML → the wire shape > extracts title, stylesheet links, and SEO meta; drops charset/viewport; absolutizes assets | Unit | pass | not run | not run | not run |
| lift_document — an app’s full HTML → the wire shape > pins the island graph to the remote: chunks, entry keys, snippet locations | Unit | pass | not run | not run | not run |
| mount() — claims auto-built from the table identity > anonymous + no experiments = NO claims header at all | Unit | pass | not run | not run | not run |
| mount() — claims auto-built from the table identity > signs c.visitor + EVERY table experiment into the hop — no hand-listing | Unit | pass | not run | not run | not run |
| mount() — claims auto-built from the table identity > STATUS CHANNEL: a mounted 404 answers 404 through the shell | Unit | pass | not run | not run | not run |
| peer transport — one per remote app > a pre-mutation in-flight fetch cannot repopulate the cache: its caller reads again | Unit | pass | not run | not run | not run |
| peer transport — one per remote app > a stale refresh that answers an error document never replaces the good copy | Unit | pass | not run | not run | not run |
| peer transport — one per remote app > coalesces concurrent misses into ONE upstream call | Unit | pass | not run | not run | not run |
| peer transport — one per remote app > failover: an unreachable primary tries the next origin; a 404 does not | Unit | pass | not run | not run | not run |
| peer transport — one per remote app > postDoc speaks AS the peer (origin header) and forwards the content-type | Unit | pass | not run | not run | not run |
| peer transport — one per remote app > serves fresh, then STALE + refreshes in background after ttl (SWR) | Unit | pass | not run | not run | not run |
| peer transport — one per remote app > widgetDoc hits the catalog path with props | Unit | pass | not run | not run | not run |
| peer transport — one per remote app > widgetDoc throws a plain Error; doc() throws http errors; a network failure is a 504 | Unit | pass | not run | not run | not run |
| remote regions > a deferred remote region is a hole with a shell-signed url | Unit | pass | not run | not run | not run |
| remote regions > a static remote page bakes its HTML and adopts the fragment’s tags into the capture | Unit | pass | not run | not run | not run |
| remote regions > mint_hole degrades to an empty inert region when no signer is installed | Unit | pass | not run | not run | not run |
packages/federation/test/owners.test.ts | |||||
| a deploy thaw is owed to the peers that missed it, not to every peer > a peer that never takes it: given up after a bounded number of rounds, with a warning naming it | Unit | pass | not run | not run | not run |
| a deploy thaw is owed to the peers that missed it, not to every peer > its policy keeps the old numbers: a round no sooner than 30 s after the last, 10 rounds | Unit | pass | not run | not run | not run |
| a deploy thaw is owed to the peers that missed it, not to every peer > one peer refuses: only it is sent the thaw again, the others take it once | Unit | pass | not run | not run | not run |
| a peer request belongs to the generation that started it (#210) > after a drop, the old request ending does not remove the new one: no second upstream fetch#210 | Unit | pass | not run | not run | not run |
| the deploy thaw is tried again until it is done (#198) > done is done: a check after a successful thaw does nothing#198 | Unit | pass | not run | not run | not run |
| the deploy thaw is tried again until it is done (#198) > requests during a check join it (one check, one thaw)#198 | Unit | pass | not run | not run | not run |
| the deploy thaw is tried again until it is done (#198) > the peer never takes the thaw AND the store goes down after the first ask: the owed thaw goes without asking it again#198 | Unit | pass | not run | not run | not run |
| the deploy thaw is tried again until it is done (#198) > the peer never takes the thaw: a later request thaws again, and the store is asked once#198 | Unit | pass | not run | not run | not run |
| the deploy thaw is tried again until it is done (#198) > the store is down for the first check: a later request checks again and thaws#198 | Unit | pass | not run | not run | not run |
packages/federation/test/peer-flights.test.ts | |||||
| a peer read is one flight per key (#294) > a mutation while a read is out: the reader gets the page as it is after it#294 | Unit | pass | not run | not run | not run |
| a peer read is one flight per key (#294) > a read that starts while a mutation is out: once the mutation ends, no read gets the page from before it#294 | Unit | pass | not run | not run | not run |
| a peer read is one flight per key (#294) > a thaw of other tags keeps the fetch in flight: its answer is kept#294 | Unit | pass | not run | not run | not run |
| a peer read is one flight per key (#294) > a thaw of the tags its answer carries: the waiting caller gets the page fetched again#294 | Unit | pass | not run | not run | not run |
packages/federation/test/router-stream.test.ts | |||||
| mount({ stream: true }) — the sugar > a COMPONENT fallback bakes as an inline region into the flushed part | Unit | pass | not run | not run | not run |
| mount({ stream: true }) — the sugar > a dead MFE yields the offline card AFTER the flush — first byte never waited | Unit | pass | not run | not run | not run |
| mount({ stream: true }) — the sugar > a late redirect degrades to a link card (status already flushed) | Unit | pass | not run | not run | not run |
| mount({ stream: true }) — the sugar > fallback flushes; the doc (css+head+body) rides the late chunk | Unit | pass | not run | not run | not run |
| page(async function*) — the streamed slot > a region that cannot bake fails LOUDLY into the error card (never an empty chunk) | Unit | pass | not run | not run | not run |
| page(async function*) — the streamed slot > a throw AFTER the flush becomes an error-card chunk, page still closes | Unit | pass | not run | not run | not run |
| page(async function*) — the streamed slot > flushes the first yield, chunks the rest as templates, boots once | Unit | pass | not run | not run | not run |
| page(async function*) — the streamed slot > non-GET buffers to the FINAL yield (actions need a whole answer) | Unit | pass | not run | not run | not run |
| page(async function*) — the streamed slot > yields REAL regions — async generators auto-await them, the resolved shapes must bake | Unit | pass | not run | not run | not run |
packages/federation/test/router-when.test.ts | |||||
| mount(pick) — the flag-picked canary > a pick that yields a non-client throws loudly, naming the fix | Unit | pass | not run | not run | not run |
| mount(pick) — the flag-picked canary > routes the hop through the picked client, stickily per visitor | Unit | pass | not run | not run | not run |
| when() — a gated-off route does not exist > endpoint: off → fall-through (null, no base); on via ?og-exp → served | Unit | pass | not run | not run | not run |
| when() — a gated-off route does not exist > page under an owned base: off → 404 without ever touching the page (no network) | Unit | pass | not run | not run | not run |
| when() — a gated-off route does not exist > the gate decision self-registers for federation carry (like any flag read) | Unit | pass | not run | not run | not run |
| when() — a gated-off route does not exist > the gate is any (c) => boolean — a plain predicate works | Unit | pass | not run | not run | not run |
packages/federation/test/sim-deploy-thaw.test.ts | |||||
| the deploy thaw, simulated > reaches every peer once the store and the peers are back, sent once to each | Unit | pass | not run | not run | not run |
packages/federation/test/sim-peer.test.ts | |||||
| a federation peer, simulated > fetches each page once per thaw, and never serves a page from before what it saw | Unit | pass | not run | not run | not run |
packages/federation/test/sim-thaw.test.ts | |||||
| a thaw notice arriving, simulated > is answered done only once applied, applied once, and passed on only then | Unit | pass | not run | not run | not run |
packages/federation/test/thaw-receive.test.ts | |||||
| a thaw notice whose evict fails (#287) > answers an error and keeps no id; the retry with the same id is applied#287 | Unit | pass | not run | not run | not run |
| two copies of a notice at once (the sender tried again while the first applied) > applies it once, and passes it on once | Unit | pass | not run | not run | not run |
packages/federation/test/thaw-send.test.ts | |||||
| a publish on a serverless platform (#286) > hands the thaw broadcast to the request's waitUntil, which holds until a peer took it#286 | Unit | pass | not run | not run | not run |
| a thaw notice no peer took > is said with the peers that missed it, once the retries are spent | Unit | pass | not run | not run | not run |