Tests / @ogygia/machine
@ogygia/machine
Version 0.14.0 latest
620ddcca 1,082 test runs (549 tests, each run in Node, the browsers or both)
1.59× lines of test for each line of source (8,112 to 5,087) 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)96.8% of source lines run by the tests
- 549Unit
- 533Browser
- 0End to end
- 0Type tests
- 0Lint rules
- 0Failing
Coverage
- 96.8%Lines
- 94.3%Branches
- 91.3%Functions
- 96.3%Statements
Every test
549 tests
| Test | Kind | Node | Chromium | Firefox | WebKit |
|---|---|---|---|---|---|
packages/machine/test/after.test.ts | |||||
| after: a state that ends on its own > a cleanup that throws during the timed step is reported, and the step is still taken | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > a move out first cancels it: no late step, no timer left | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > a state with no `after` costs no timer | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > a step to itself is a new visit too | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > a time made from the state’s value: the retry waits longer each attempt | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > a timed step that fails (its data throws) is reported; the machine stays where it is | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > an initial state with a timeout starts its time when the machine is made | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > an observer that moves the machine during the timed step leaves no stray timer | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > coming back starts the time again (the old visit’s time never fires) | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > still in the state when its time is up: the machine takes the step, with its data | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > stop() cancels it | Unit, Browser | pass | pass | pass | pass |
| after: a state that ends on its own > the timed step is a move like any other: tasks end, cleanups run, waits and observers hear it | Unit, Browser | pass | pass | pass | pass |
| after: refused definitions > a state that is not a state | Unit, Browser | pass | pass | pass | pass |
| after: refused definitions > a target that is not one of the state’s steps | Unit, Browser | pass | pass | pass | pass |
| after: refused definitions > a time made from the state that is not a time: reported, and the state does not end at once | Unit, Browser | pass | pass | pass | pass |
| after: refused definitions > a time that is not a time, or longer than a timer can hold (2^31 - 1 ms, ~24.8 days) | Unit, Browser | pass | pass | pass | pass |
| after: refused definitions > the longest time a timer holds is accepted | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/cache.test.ts | |||||
| cache: ages > a set may say its own keep, in place of the cache’s, which is then not asked | Unit, Browser | pass | pass | pass | pass |
| cache: ages > ages are swept at most once a second: a value due soon after a sweep goes with the next (reads are exact) | Unit, Browser | pass | pass | pass | pass |
| cache: ages > keep is how long a value stays; one past its age is gone, noticed as age | Unit, Browser | pass | pass | pass | pass |
| cache: ages > keep made from the value and key; 0 keeps nothing | Unit, Browser | pass | pass | pass | pass |
| cache: ages > one timer for all the ages, owned by the cache | Unit, Browser | pass | pass | pass | pass |
| cache: ages > the expired go before any live value goes for size | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > a keep that is no time is refused: a negative one, or one that is not a number or function | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > a peek is not a use | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > a pinned value counts against max but does not go for size: the next oldest goes | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > a set that must make room replaces the key’s own value past its age: noticed as a replace, never as its age | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > a set that only pinned values could make room for is not kept: it says false, nothing goes, and the old one stays | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > a value heavier than max, or with a bad weight, is not kept, and the old one stays | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > flights keeps at most 1000 answers by default, the least recently used out first | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > max is required: there is no unbounded default | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > no options at all is refused with a code, never a TypeError reading them | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > past max, the least recently used goes first, and a get is a use | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > the least recently used order holds through repeated uses, replaces and lets go of the newest | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > the newest value read after it left finds nothing, whichever way it left | Unit, Browser | pass | pass | pass | pass |
| cache: bounded > weigh counts against max: as many go as it takes, oldest first | Unit, Browser | pass | pass | pass | pass |
| cache: freshness > a stamp with no world is refused as a bad option | Unit, Browser | pass | pass | pass | pass |
| cache: freshness > a write with no stamp takes the world now | Unit, Browser | pass | pass | pass | pass |
| cache: freshness > an older write never overwrites a newer one | Unit, Browser | pass | pass | pass | pass |
| cache: owned > an ended owner gives an ended cache | Unit, Browser | pass | pass | pass | pass |
| cache: owned > its owner ending ends it: every value noticed as end, oldest first, and nothing kept after | Unit, Browser | pass | pass | pass | pass |
| cache: owned > with no owner it ends when disposed (a scope can adopt it) | Unit, Browser | pass | pass | pass | pass |
| cache: the eviction notice > a delete and a replace are noticed as delete; a clear notices each, oldest first | Unit, Browser | pass | pass | pass | pass |
| cache: the eviction notice > a flights answer that lands while the one it replaces is past its age is kept | Unit, Browser | pass | pass | pass | pass |
| cache: the eviction notice > a notice that throws is reported with its code; the cache goes on | Unit, Browser | pass | pass | pass | pass |
| cache: the eviction notice > a set or delete inside a notice is defined: its own notices come after the ones already due | Unit, Browser | pass | pass | pass | pass |
| cache: the eviction notice > a value replaced after its age, before its timer ran, is noticed as delete, not age | Unit, Browser | pass | pass | pass | pass |
| cache: the eviction notice > the value a key holds, set again, stays: no notice, its age starting over | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/capability.test.ts | |||||
| capability: deterministic tokens > a nonce-less token never checks where nonces are on, nor the other way | Unit, Browser | pass | pass | pass | pass |
| capability: deterministic tokens > mintUntil names the expiry itself, so two mints at different moments of one window match | Unit, Browser | pass | pass | pass | pass |
| capability: deterministic tokens > nonce off with replay on is refused: such tokens are not single-use | Unit, Browser | pass | pass | pass | pass |
| capability: deterministic tokens > with nonce off, the same audience, fields and expiry mint the same token, which checks as often as presented | Unit, Browser | pass | pass | pass | pass |
| capability: lifetime > a mint is clamped to [min, max]; a token claiming more than max is refused | Unit, Browser | pass | pass | pass | pass |
| capability: lifetime > a NaN clock mints nothing and checks nothing; a NaN ttl mints nothing | Unit, Browser | pass | pass | pass | pass |
| capability: options > refuses a missing audience, name, version or bounds with a coded error | Unit, Browser | pass | pass | pass | pass |
| capability: options > refuses a signer whose signature is not URL-safe | Unit, Browser | pass | pass | pass | pass |
| capability: options > takes the highest version and a ttl.min equal to ttl.max; refuses a NaN ttl.min | Unit, Browser | pass | pass | pass | pass |
| capability: replay > a full memory refuses a new token, never forgets a live one; an expired one makes room | Unit, Browser | pass | pass | pass | pass |
| capability: replay > with replay, a nonce checks once; without, as often as presented | Unit, Browser | pass | pass | pass | pass |
| capability: the keys a check trusts > a check may bring its own verify (a list of keys in rotation): it replaces the signer’s | Unit, Browser | pass | pass | pass | pass |
| capability: two machines’ clocks > a remembered nonce stays until its token could no longer check, skew included | Unit, Browser | pass | pass | pass | pass |
| capability: two machines’ clocks > with skew, a token lives skew past its expiry and may claim skew past max, no more | Unit, Browser | pass | pass | pass | pass |
| capability: what checks > a token checks for its audience and fields, until it expires | Unit, Browser | pass | pass | pass | pass |
| capability: what checks > another audience, field, name, version or key is refused | Unit, Browser | pass | pass | pass | pass |
| capability: what checks > any changed character of a token is refused | Unit, Browser | pass | pass | pass | pass |
| capability: what checks > fields cannot trade text across a boundary | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/clock.test.ts | |||||
| a queue reads deadlines on the monotonic clock > with no `now` of its own, a waiting job is past its deadline once clock.mono() says so (#1014)#1014 | Unit, Browser | pass | pass | pass | pass |
| a retry deadline is counted from the run’s start > a wait that would end exactly at the deadline is out of time at once | Unit, Browser | pass | pass | pass | pass |
| a retry deadline is counted from the run’s start > not from the clock’s zero: a process up for days still retries | Unit, Browser | pass | pass | pass | pass |
| a wall-clock step moves no duration > a kept answer stays kept for its TTL, however the wall clock steps (seeded) | Unit, Browser | pass | pass | pass | pass |
| a wall-clock step moves no duration > a retry policy keeps its deadline when the wall clock jumps forward mid-run | Unit, Browser | pass | pass | pass | pass |
| clock > mono is the monotonic clock, wall the wall clock | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/decisions-production.node.test.ts | |||||
| decisions(): a production build > a rules build (OGYGIA_RULES=1) keeps the field check | Unit | pass | not run | not run | not run |
| decisions(): a production build > does not check fields (the check folds out), and still refuses | Unit | pass | not run | not run | not run |
packages/machine/test/decisions.test.ts | |||||
| decisions(): decide > a refused input throws its code, naming the input and the reason | Unit, Browser | pass | pass | pass | pass |
| decisions(): decide > a table with no refuse decides every input | Unit, Browser | pass | pass | pass | pass |
| decisions(): decide > gives the plan decide makes for an input | Unit, Browser | pass | pass | pass | pass |
| decisions(): decide > in dev, a value outside its field list throws, naming the field | Unit, Browser | pass | pass | pass | pass |
| decisions(): decide > in dev, an empty or repeated field list is refused where the table is made | Unit, Browser | pass | pass | pass | pass |
| decisions(): decide > keeps the definition as given | Unit, Browser | pass | pass | pass | pass |
| decisions(): decide > the field check runs before refuse and decide see the input | Unit, Browser | pass | pass | pass | pass |
| decisions(): types > infers the input from the field lists, and the plan from decide | Unit, Browser | pass | pass | pass | pass |
| testing: check > a rule that returns something other than true breaks | Unit, Browser | pass | pass | pass | pass |
| testing: check > a rule that throws breaks, with what it threw | Unit, Browser | pass | pass | pass | pass |
| testing: check > returns how many rows it checked when every rule holds | Unit, Browser | pass | pass | pass | pass |
| testing: check > throws naming each broken rule with the first row that breaks it | Unit, Browser | pass | pass | pass | pass |
| testing: count and rows > a sample is that many distinct rows, the same for the same seed (property) | Unit, Browser | pass | pass | pass | pass |
| testing: count and rows > a table with no fields has one row, the empty input | Unit, Browser | pass | pass | pass | pass |
| testing: count and rows > another seed picks other rows | Unit, Browser | pass | pass | pass | pass |
| testing: count and rows > count is the product of the list lengths | Unit, Browser | pass | pass | pass | pass |
| testing: count and rows > every row is a combination of the lists, each once, as many as count (property) | Unit, Browser | pass | pass | pass | pass |
| testing: count and rows > rows is lazy: it decides one row per step | Unit, Browser | pass | pass | pass | pass |
| testing: count and rows > rows walks every combination in order, the last field fastest, refused ones named | Unit, Browser | pass | pass | pass | pass |
| testing: dead_fields > a field that only changes the refusal is not dead | Unit, Browser | pass | pass | pass | pass |
| testing: dead_fields > equal plans that are new objects count as the same | Unit, Browser | pass | pass | pass | pass |
| testing: dead_fields > names the fields that never change the outcome | Unit, Browser | pass | pass | pass | pass |
| testing: dead_fields > the fields decide reads, with more than one value, are exactly the live ones (property) | Unit, Browser | pass | pass | pass | pass |
| testing: table > a plan that is not an object is one plan column; pipes and line breaks are escaped | Unit, Browser | pass | pass | pass | pass |
| testing: table > one row per input, fields as columns, the plan flattened, refused last | Unit, Browser | pass | pass | pass | pass |
| testing: the huge-space guard > a higher max walks it; a sample walks a seeded few | Unit, Browser | pass | pass | pass | pass |
| testing: the huge-space guard > refuses a sample that is not whole numbers, and a max under 1 | Unit, Browser | pass | pass | pass | pass |
| testing: the huge-space guard > refuses past 100,000 rows at once, naming the count and how to sample | Unit, Browser | pass | pass | pass | pass |
| testing: the huge-space guard > samples a space past the largest exact index (2^53) all the same: distinct rows | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/flights.test.ts | |||||
| fresh > a fresh flight ends the one already out: its callers get STALE | Unit, Browser | pass | pass | pass | pass |
| fresh > a fresh flight over one whose callers have signals: they get STALE, and their leaving later stops nothing | Unit, Browser | pass | pass | pass | pass |
| fresh > a refresh that fails, or answers what is not kept, leaves the kept answer in place | Unit, Browser | pass | pass | pass | pass |
| fresh > starts a new flight beside the kept answer, which stays until the new one lands | Unit, Browser | pass | pass | pass | pass |
| fresh > the last caller of a refresh leaving puts the kept answer back | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > `keep` made from the answer: 0 keeps nothing (callers share the flight while it is out) | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > `max` counts answers: past it the least recently used goes first | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > `weigh` puts each answer against `max`; one heavier than all of `max` is not kept | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > a keep or weigh that throws fails the flight and keeps nothing | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > a refresh out keeps its prior against `max` until it lands; nothing kept passes `max` after | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > a refresh that lands past its prior’s age, into a full cache no sweep has reached yet, is kept | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > a weight below 0 or not a number is not kept, so `max` still caps (#355)#355 | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > an expired answer goes before a live one is pushed out (#356)#356 | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > an expired answer is swept out when a new flight starts | Unit, Browser | pass | pass | pass | pass |
| keep, max and weigh > keeps an answer for `keep` ms, real time, then runs again | Unit, Browser | pass | pass | pass | pass |
| keyed > `key` names the fields that are one flight; the input that started it is the one that runs | Unit, Browser | pass | pass | pass | pass |
| keyed > a caller that leaves gets STALE at once; the work stops only when the last one has left | Unit, Browser | pass | pass | pass | pass |
| keyed > a caller whose signal already aborted gets STALE and starts nothing | Unit, Browser | pass | pass | pass | pass |
| keyed > a caller with no signal holds the flight: the others leaving does not stop it | Unit, Browser | pass | pass | pass | pass |
| keyed > a drop ends the flight out: every caller gets STALE, its signal aborts, nothing is kept | Unit, Browser | pass | pass | pass | pass |
| keyed > a drop predicate that gets or drops as it is asked: every key is asked once, every caller settles | Unit, Browser | pass | pass | pass | pass |
| keyed > a failure that lands after a drop is STALE, not a failure, for the callers of that flight | Unit, Browser | pass | pass | pass | pass |
| keyed > a kept answer reaches a caller with a signal too | Unit, Browser | pass | pass | pass | pass |
| keyed > a key field compares objects by identity, and keeps every kind of value apart | Unit, Browser | pass | pass | pass | pass |
| keyed > a keyed flights refuses a key it cannot use, where it is written | Unit, Browser | pass | pass | pass | pass |
| keyed > a missing key field and one that is undefined are one key; a registered symbol is one by its name | Unit, Browser | pass | pass | pass | pass |
| keyed > a run that gets its own key before it returns joins its own flight (#354)#354 | Unit, Browser | pass | pass | pass | pass |
| keyed > drop by key fields, or by a predicate over them (never over the rest of the input) | Unit, Browser | pass | pass | pass | pass |
| keyed > drop takes a predicate, over kept answers and flights out alike | Unit, Browser | pass | pass | pass | pass |
| keyed > one flight per key: the same key joins, another key runs on its own | Unit, Browser | pass | pass | pass | pass |
| keyed > runs inside the get that starts it, with a signal of its own | Unit, Browser | pass | pass | pass | pass |
| keyed > two inputs that differ in any key field never share an answer | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > a deadline aborts the try out and fails with a TimeoutError | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > a drop during the wait between tries ends them: STALE, no next try | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > a run that throws synchronously is a failure too | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > a weigh with no max is refused: the default max counts answers, not the weigh’s unit | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > callers while it runs share the one run, and the same promise | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > every caller of a failed run gets the failure, then the next get starts fresh | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > gives the last failure when its tries run out | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > its own handling of a failure adds no unhandled rejection | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > never keeps a failure: the next get runs again | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > refuses options it cannot take | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > runs on the first get and keeps the answer | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > takes a plain value | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > tries again at once before it fails, within the turn: no timer between tries | Unit, Browser | pass | pass | pass | pass |
| one key (what once() was) > waits between tries as its policy says, real timers | Unit, Browser | pass | pass | pass | pass |
| owned > a disposed flights drops everything and runs nothing after | Unit, Browser | pass | pass | pass | pass |
| owned > a scope adopts it: closing the scope ends its flights | Unit, Browser | pass | pass | pass | pass |
| priority > a caller that leaves does not take the raise back | Unit, Browser | pass | pass | pass | pass |
| priority > a fresh flight starts at its own caller priority | Unit, Browser | pass | pass | pass | pass |
| priority > a join with a higher priority raises the flight, and the run hears it | Unit, Browser | pass | pass | pass | pass |
| priority > a join with a lower or equal priority never lowers it, and is not heard | Unit, Browser | pass | pass | pass | pass |
| priority > a kept answer is given as it is: no run, nothing raised | Unit, Browser | pass | pass | pass | pass |
| priority > a priority that is not a number is refused | Unit, Browser | pass | pass | pass | pass |
| priority > a raise is heard only by the try that is out: a failed try’s listeners are let go | Unit, Browser | pass | pass | pass | pass |
| priority > a raise listener that is not a function is refused with a code, when it is added | Unit, Browser | pass | pass | pass | pass |
| priority > a raise listener that throws is said, and the join and the other listeners go on | Unit, Browser | pass | pass | pass | pass |
| priority > a run sees the priority of the get that started it (0 when it gave none) | Unit, Browser | pass | pass | pass | pass |
| priority > every try a retry policy gives reads the priority as it stands | Unit, Browser | pass | pass | pass | pass |
| priority > keyed: two inputs of one key are one flight, raised by the later | Unit, Browser | pass | pass | pass | pass |
| under load (real concurrency) > random gets, leaves, drops and answers: one run per flight, every caller settles, nothing failed is kept | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/graph.test.ts | |||||
| graph() > every state, its steps, whether it is final, and its own timeout | Unit, Browser | pass | pass | pass | pass |
| graph() > is plain data: it survives JSON (devtools send it over the wire) | Unit, Browser | pass | pass | pass | pass |
| paths() > between them they take every step of the definition | Unit, Browser | pass | pass | pass | pass |
| paths() > every path can be driven: each move along it is allowed | Unit, Browser | pass | pass | pass | pass |
| paths() > one path per step, each the shortest that reaches its state and takes it | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/lock.test.ts | |||||
| lock > a free lock refuses any free | Unit, Browser | pass | pass | pass | pass |
| lock > acquire: a waiter handed the lock lets go of its abort listener (a long-lived signal does not pile them up) | Unit, Browser | pass | pass | pass | pass |
| lock > acquire: an abort after its turn changes nothing | Unit, Browser | pass | pass | pass | pass |
| lock > acquire: an abort before its turn leaves the queue and rejects with the reason | Unit, Browser | pass | pass | pass | pass |
| lock > acquire: an already aborted signal rejects at once and never takes it | Unit, Browser | pass | pass | pass | pass |
| lock > acquire: at once when free | Unit, Browser | pass | pass | pass | pass |
| lock > acquire: waits its turn, first come first served, handed straight on | Unit, Browser | pass | pass | pass | pass |
| lock > every take gets a new token | Unit, Browser | pass | pass | pass | pass |
| lock > freeing twice does nothing the second time | Unit, Browser | pass | pass | pass | pass |
| lock > only the token that holds it frees it | Unit, Browser | pass | pass | pass | pass |
| lock > random runs agree with a model: one owner, exact held, first come first served | Unit, Browser | pass | pass | pass | pass |
| lock > seize: takes it from a stuck owner, whose late free is then refused | Unit, Browser | pass | pass | pass | pass |
| lock > take: one owner at a time | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/machine.test.ts | |||||
| definition > a one-state machine works (initial, final) | Unit, Browser | pass | pass | pass | pass |
| definition > copies the steps: changing the object it was given changes nothing | Unit, Browser | pass | pass | pass | pass |
| definition > keeps its name, initial and steps, frozen | Unit, Browser | pass | pass | pass | pass |
| definition > names its error: a MachineError with the code and its page | Unit, Browser | pass | pass | pass | pass |
| definition > refuses a state that can never be reached | Unit, Browser | pass | pass | pass | pass |
| definition > refuses a step listed twice | Unit, Browser | pass | pass | pass | pass |
| definition > refuses a step to a state that is not a state | Unit, Browser | pass | pass | pass | pass |
| definition > refuses an initial state that is not a state | Unit, Browser | pass | pass | pass | pass |
| definition > starts in an initial state that carries data | Unit, Browser | pass | pass | pass | pass |
| definition > treats state names like Object.prototype keys as plain names | Unit, Browser | pass | pass | pass | pass |
| go > a final state goes nowhere | Unit, Browser | pass | pass | pass | pass |
| go > a state can step to itself (a fresh visit) | Unit, Browser | pass | pass | pass | pass |
| go > moves along a step and says so | Unit, Browser | pass | pass | pass | pass |
| go > throws in dev for a move the steps do not allow, and stays put | Unit, Browser | pass | pass | pass | pass |
| machines are independent > machines of different definitions do not mix | Unit, Browser | pass | pass | pass | pass |
| machines are independent > the STALE symbol is the same across copies of the package | Unit, Browser | pass | pass | pass | pass |
| machines are independent > two machines of one definition share nothing | Unit, Browser | pass | pass | pass | pass |
| move > moves when the machine is still in from | Unit, Browser | pass | pass | pass | pass |
| move > refuses quietly when something else moved it first | Unit, Browser | pass | pass | pass | pass |
| move > throws in dev for a step that does not exist, even when not in from | Unit, Browser | pass | pass | pass | pass |
| now > a dataless state entered with {} is still that state | Unit, Browser | pass | pass | pass | pass |
| now > a dataless step to itself is a new visit too | Unit, Browser | pass | pass | pass | pass |
| now > carries the data of the state it is in, frozen in dev | Unit, Browser | pass | pass | pass | pass |
| now > copies the data: changing the object passed in changes nothing | Unit, Browser | pass | pass | pass | pass |
| now > is a new value on every visit, with no data too: a saved now tells the visits apart | Unit, Browser | pass | pass | pass | pass |
| now > is the same value for as long as the visit lasts | Unit, Browser | pass | pass | pass | pass |
| now > refuses data with its own kind | Unit, Browser | pass | pass | pass | pass |
| now > starts in initial, a value of its own, frozen in dev | Unit, Browser | pass | pass | pass | pass |
| observe > an observer that moves the machine again sees both moves in order | Unit, Browser | pass | pass | pass | pass |
| observe > an observer that throws does not break the move or the other observers | Unit, Browser | pass | pass | pass | pass |
| observe > an observer that unsubscribes itself mid-move does not skip the next one | Unit, Browser | pass | pass | pass | pass |
| observe > hears every move and the stop, with the machine | Unit, Browser | pass | pass | pass | pass |
| observe > hears nothing for a refused move | Unit, Browser | pass | pass | pass | pass |
| observe > stops hearing once it unsubscribes | Unit, Browser | pass | pass | pass | pass |
| scope.defer: cleanups of one visit > a cleanup that moves the machine again works, and the next visit starts clean | Unit, Browser | pass | pass | pass | pass |
| scope.defer: cleanups of one visit > a refused move runs no cleanup | Unit, Browser | pass | pass | pass | pass |
| scope.defer: cleanups of one visit > belongs to the visit it was added in | Unit, Browser | pass | pass | pass | pass |
| scope.defer: cleanups of one visit > one that throws does not stop the others or the move; the move throws after | Unit, Browser | pass | pass | pass | pass |
| scope.defer: cleanups of one visit > runs at once on a stopped machine | Unit, Browser | pass | pass | pass | pass |
| scope.defer: cleanups of one visit > runs once when the machine leaves, newest first | Unit, Browser | pass | pass | pass | pass |
| scope.defer: cleanups of one visit > sees the new state already in place | Unit, Browser | pass | pass | pass | pass |
| scope.defer: cleanups of one visit > several that throw come back together | Unit, Browser | pass | pass | pass | pass |
| scope.defer: cleanups of one visit > the signal aborts before the cleanups run | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > a move with no task makes no abort controller | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > a stopped machine does not run work | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > drops an answer that lands after the machine left | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > drops it even when the machine came back to the same state (a new visit) | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > drops it on a step to itself too | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > gives the answer while the machine stays put | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > passes a live signal, aborted once the machine leaves | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > rejects with the failure while the machine stays put | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > settles with STALE the moment the machine leaves, even when work never finishes | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > takes a plain value too | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > tasks of one visit share one signal; the next visit gets a new one | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > turns a failure after the machine left into STALE (no unhandled error) | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > turns a synchronous throw into a rejection | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > work that ignores its signal and answers late still gives STALE once | Unit, Browser | pass | pass | pass | pass |
| scope.task: work of one visit > work that moves the machine itself gives STALE | Unit, Browser | pass | pass | pass | pass |
| stop > a cleanup that throws on stop still runs the rest, then throws | Unit, Browser | pass | pass | pass | pass |
| stop > aborts tasks, runs cleanups, settles waits, refuses moves quietly | Unit, Browser | pass | pass | pass | pass |
| stop > twice is the same as once | Unit, Browser | pass | pass | pass | pass |
| wait > gives STALE as soon as the state cannot be reached any more | Unit, Browser | pass | pass | pass | pass |
| wait > gives STALE at once when the state is out of reach already | Unit, Browser | pass | pass | pass | pass |
| wait > many waits on many states settle each in turn | Unit, Browser | pass | pass | pass | pass |
| wait > once every wait settled, the machine holds no wait list (a long-lived machine does not pile them up) | Unit, Browser | pass | pass | pass | pass |
| wait > settles at once when the machine is in the state | Unit, Browser | pass | pass | pass | pass |
| wait > settles with the state it entered, even if the machine moved on since | Unit, Browser | pass | pass | pass | pass |
| wait > settles with the state when the machine gets there | Unit, Browser | pass | pass | pass | pass |
| wait > stop settles every wait with STALE | Unit, Browser | pass | pass | pass | pass |
| wait > throws in dev for a state that does not exist | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/mailbox-turns.test.ts | |||||
| mailbox turns > a handler back in its turn from one wait takes its other wait’s return at once, not behind itself | Unit, Browser | pass | pass | pass | pass |
| mailbox turns > a handler that ended while its return was queued takes no turn: the next event still runs | Unit, Browser | pass | pass | pass | pass |
| mailbox turns > an asker hears a handler that rejects after its turn began, and the box goes on | Unit, Browser | pass | pass | pass | pass |
| mailbox turns > an event still queued when the owner closes never runs, though the turn ahead of it ends after | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/mailbox.node.test.ts | |||||
| a mailbox in a Node process > a posted handler that rejects later is an unhandled rejection, as a direct call’s would be | Unit | pass | not run | not run | not run |
| a mailbox in a Node process > a posted handler that rejects later still ends its turn: the next one runs | Unit | pass | not run | not run | not run |
packages/machine/test/mailbox.test.ts | |||||
| mailbox > a closed box holds nothing: no queue, no waits | Unit, Browser | pass | pass | pass | pass |
| mailbox > a handler back from its wait holds the turn again: an event it posts runs after it | Unit, Browser | pass | pass | pass | pass |
| mailbox > a handler handed the turn back from the queue holds it: an event it posts runs after it | Unit, Browser | pass | pass | pass | pass |
| mailbox > a handler that ended while its wait sat in the queue takes no turn: the box goes on | Unit, Browser | pass | pass | pass | pass |
| mailbox > a handler that never settles holds the box until its owner closes | Unit, Browser | pass | pass | pass | pass |
| mailbox > a handler waiting on two things at once lets one event in, not two at once (#341)#341 | Unit, Browser | pass | pass | pass | pass |
| mailbox > a queued ask that has run leaves the wait list, so a long-lived box does not grow (#564)#564 | Unit, Browser | pass | pass | pass | pass |
| mailbox > a timer of a handler that waits after its turn ended takes nobody’s turn (#341)#341 | Unit, Browser | pass | pass | pass | pass |
| mailbox > a wait from a handler whose turn already ended ends nobody’s turn (#341)#341 | Unit, Browser | pass | pass | pass | pass |
| mailbox > a wait from outside any turn ends nobody’s turn (#341)#341 | Unit, Browser | pass | pass | pass | pass |
| mailbox > a wait whose work settled while another handler held the turn hears STALE when the box closes | Unit, Browser | pass | pass | pass | pass |
| mailbox > an ask whose handler waits, then sees its element leave: STALE for the asker too | Unit, Browser | pass | pass | pass | pass |
| mailbox > an asker whose handler throws after waiting its turn hears the failure, never waits for good | Unit, Browser | pass | pass | pass | pass |
| mailbox > ask() gives the handler’s value, sync or async, in its turn | Unit, Browser | pass | pass | pass | pass |
| mailbox > ends with its owner: queued events are dropped, a wait is STALE at once, later posts too | Unit, Browser | pass | pass | pass | pass |
| mailbox > gives a handler coming back from its wait no turn while another holds one | Unit, Browser | pass | pass | pass | pass |
| mailbox > holds the turn across a plain await: nothing else runs until the handler is back | Unit, Browser | pass | pass | pass | pass |
| mailbox > is closed for an owner already closed | Unit, Browser | pass | pass | pass | pass |
| mailbox > lets the next event in while a handler waits, and gives it its turn back behind it | Unit, Browser | pass | pass | pass | pass |
| mailbox > reports a queued handler that throws, and goes on with the next | Unit, Browser | pass | pass | pass | pass |
| mailbox > runs a long run of sync events queued in one turn, on a flat stack (#342)#342 | Unit, Browser | pass | pass | pass | pass |
| mailbox > runs an event posted during a turn after it, never inside it | Unit, Browser | pass | pass | pass | pass |
| mailbox > runs an event posted to an idle box at once, on the caller’s stack | Unit, Browser | pass | pass | pass | pass |
| mailbox > runs events in the order they were posted, across waits | Unit, Browser | pass | pass | pass | pass |
| mailbox > tells an asker whose event was dropped STALE | Unit, Browser | pass | pass | pass | pass |
| mailbox > throws a handler’s failure to its asker, and a wait’s rejection back in the turn | Unit, Browser | pass | pass | pass | pass |
| mailbox > throws a sync failure to its poster when it runs at once | Unit, Browser | pass | pass | pass | pass |
| mailbox > with no page error handler, a queued handler’s throw follows its code | Unit, Browser | pass | pass | pass | pass |
| mailbox > work that settles after the box closed changes nothing: the box stays closed and idle | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/module-collections.test.ts | |||||
| observers are kept until each stops, and hear moves in the order they started watching | Unit, Browser | pass | pass | pass | pass |
| the once-per-warning memory is bounded: past its size, the oldest warning can be said again | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/outbox-defaults.test.ts | |||||
| outbox defaults > with no retry, a failed send is tried again by the standard policy | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/outbox.test.ts | |||||
| id > a put of an id still out joins it: one send | Unit, Browser | pass | pass | pass | pass |
| id > a receiver that failed to apply is tried again until it applies | Unit, Browser | pass | pass | pass | pass |
| id > done means applied: an answer lost after the apply is sent again, and the receiver drops the copy | Unit, Browser | pass | pass | pass | pass |
| inOrder > a put of an id still queued joins it: one send, in its place in line | Unit, Browser | pass | pass | pass | pass |
| inOrder > one given up does not stop the ones after it | Unit, Browser | pass | pass | pass | pass |
| inOrder > one send at a time, in put order, a failing one tried again before the next goes | Unit, Browser | pass | pass | pass | pass |
| inOrder > sends go out together without it | Unit, Browser | pass | pass | pass | pass |
| inOrder > the deadline counts from its own turn, not from the put | Unit, Browser | pass | pass | pass | pass |
| inOrder > with none ahead, the send starts inside the put; behind one, once it ends | Unit, Browser | pass | pass | pass | pass |
| policy > a list backs off by its entries (the last repeats); a number doubles | Unit, Browser | pass | pass | pass | pass |
| policy > a run that answered leaves no timer behind, not even its deadline’s | Unit, Browser | pass | pass | pass | pass |
| policy > a wait is always a number of 0 to the timer limit: before the first try, and after very many (#359)#359 | Unit, Browser | pass | pass | pass | pass |
| policy > fills what it leaves out from the standard one, and is frozen | Unit, Browser | pass | pass | pass | pass |
| policy > jitter cuts a wait by up to its share | Unit, Browser | pass | pass | pass | pass |
| policy > out of time before the next wait ends is a TimeoutError with the last error in it (#359)#359 | Unit, Browser | pass | pass | pass | pass |
| policy > refuses numbers it cannot use, where they are written | Unit, Browser | pass | pass | pass | pass |
| policy > takes the longest wait a timer can hold, and no longer | Unit, Browser | pass | pass | pass | pass |
| policy > the caller leaving and the deadline in the same turn: whichever came first says how it ended | Unit, Browser | pass | pass | pass | pass |
| policy > the outbox refuses a send that is not a function | Unit, Browser | pass | pass | pass | pass |
| put > a giveUp that throws is printed with the code | Unit, Browser | pass | pass | pass | pass |
| put > a send that throws before it returns is a failed try like any other | Unit, Browser | pass | pass | pass | pass |
| put > an id that is not a string or a finite number names nothing: not sent, said, false (#350)#350 | Unit, Browser | pass | pass | pass | pass |
| put > an id that throws: not sent, said, and put still never throws | Unit, Browser | pass | pass | pass | pass |
| put > gives up at once when the next wait would end past the deadline | Unit, Browser | pass | pass | pass | pass |
| put > ids 1 and "1" are two sends | Unit, Browser | pass | pass | pass | pass |
| put > out of tries: giveUp hears the last error once, and the put resolves false | Unit, Browser | pass | pass | pass | pass |
| put > returns at once, never throws, and resolves true once the send is done | Unit, Browser | pass | pass | pass | pass |
| put > the deadline aborts the try still out, and no try starts after it | Unit, Browser | pass | pass | pass | pass |
| put > tries a failed send again after its backoff, until one is done | Unit, Browser | pass | pass | pass | pass |
| put > with no giveUp, a send given up is printed once with its code | Unit, Browser | pass | pass | pass | pass |
| waitUntil > a platform that refuses it does not stop the send, and put does not throw | Unit, Browser | pass | pass | pass | pass |
| waitUntil > is handed each send, which settles when the send ends | Unit, Browser | pass | pass | pass | pass |
| waitUntil > puts that join one send each hand it over, and each settles when that one send ends | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/policy-run.test.ts | |||||
| a caller whose signal already aborted gets STALE, and the work never runs | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/process.node.test.ts | |||||
| a Node process > collects a flights nobody holds, and its world forgets it (#352)#352 | Unit | pass | not run | not run | not run |
| a Node process > frees a symbol a keyed flights spelled into a key, once nothing holds it (#357)#357 | Unit | pass | not run | not run | not run |
| a Node process > loads any module of the package first: no import cycle runs a module before its classes | Unit | pass | not run | not run | not run |
| a Node process > stays alive through the wait between two tries of a send (#351)#351 | Unit | pass | not run | not run | not run |
packages/machine/test/production.test.ts | |||||
| production > a saved now still tells two visits to one dataless state apart | Unit, Browser | pass | pass | pass | pass |
| production > a step to a state that does not exist is skipped by wait() and paths() too, not a throw (#358)#358 | Unit, Browser | pass | pass | pass | pass |
| production > does not freeze data values (a production build skips the dev-only copy checks) | Unit, Browser | pass | pass | pass | pass |
| production > prints again for a different wrong move | Unit, Browser | pass | pass | pass | pass |
| production > refuses a wrong move: false, stays put, prints the link once | Unit, Browser | pass | pass | pass | pass |
| production > skips the definition checks but still refuses an initial that is not a state | Unit, Browser | pass | pass | pass | pass |
| production > wait for a state that does not exist is STALE, not a throw | Unit, Browser | pass | pass | pass | pass |
| production: a cache with no bound > a flights with no bound is thrown where it is written, even in production | Unit, Browser | pass | pass | pass | pass |
| production: a cache with no bound > is refused, not thrown: it keeps nothing, and the code is printed | Unit, Browser | pass | pass | pass | pass |
| production: a slot asked for at another version > keeps one private value for that version, made once, and says it once | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/queue-passes.test.ts | |||||
| budget > a drain starts jobs for ms, then yields, and goes on when resumed | Unit, Browser | pass | pass | pass | pass |
| budget > a drain whose last start runs past its budget ends there, with no yield for nothing | Unit, Browser | pass | pass | pass | pass |
| budget > a yield that throws is reported, and the drain goes on without it | Unit, Browser | pass | pass | pass | pass |
| budget > defer: a drain begins with a yield, and one yield starts every job queued before it | Unit, Browser | pass | pass | pass | pass |
| budget > settle: a start’s promise holder takes its first step before the next job is chosen | Unit, Browser | pass | pass | pass | pass |
| budget > settle: jobs pushed in a drain’s last microtask take one more pass, not a pass each | Unit, Browser | pass | pass | pass | pass |
| budget > the first start goes out at once, without a yield before it | Unit, Browser | pass | pass | pass | pass |
| options > a bad window max, too many windows or a bad budget is refused with machine_bad_option | Unit, Browser | pass | pass | pass | pass |
| passes > a job past its deadline is stale and never starts, ready or not | Unit, Browser | pass | pass | pass | pass |
| passes > a job pushed while a pass runs goes after the pass’s jobs, in the order pushed | Unit, Browser | pass | pass | pass | pass |
| passes > a rule that throws ends the drain and throws to the caller; the next wake drains again | Unit, Browser | pass | pass | pass | pass |
| passes > a rule that throws in a drain its yield resumed at once throws to the caller, not as the yield’s failure | Unit, Browser | pass | pass | pass | pass |
| passes > a start that throws is reported, its place and windows go back, and the pass goes on | Unit, Browser | pass | pass | pass | pass |
| passes > a window alone counts places: holding is the started jobs not yet released | Unit, Browser | pass | pass | pass | pass |
| passes > cancel takes a waiting job out, stale; the owner closing mid-yield starts nothing more | Unit, Browser | pass | pass | pass | pass |
| passes > no max and no window: every job starts, and none holds a place (its release does nothing) | Unit, Browser | pass | pass | pass | pass |
| priority > a priority raised mid-drain, while it yields, counts at the pass after the yield | Unit, Browser | pass | pass | pass | pass |
| priority > ranks far apart or not whole still go highest first, ties in the order pushed | Unit, Browser | pass | pass | pass | pass |
| priority > recheck() reads a raise at once when the queue is idle | Unit, Browser | pass | pass | pass | pass |
| priority > the higher starts first, and ties keep the order pushed | Unit, Browser | pass | pass | pass | pass |
| ready > a job that is not ready is passed over, and the jobs behind it start | Unit, Browser | pass | pass | pass | pass |
| ready > a not-ready job does not hold its place in the cap: the next ready one takes it | Unit, Browser | pass | pass | pass | pass |
| seeded runs (DST) > priorities raised while drains yield: every start is the best job that may start, within every cap | Unit, Browser | pass | pass | pass | pass |
| seeded runs (DST) > raises and releases inside settled starts: caps hold and every job starts | Unit, Browser | pass | pass | pass | pass |
| windows > a job in two windows counts in both until its place is released, once | Unit, Browser | pass | pass | pass | pass |
| windows > a window caps the jobs it holds; the others start beside them | Unit, Browser | pass | pass | pass | pass |
| windows > a window freed mid-yield lets the next job in at the pass after the yield | Unit, Browser | pass | pass | pass | pass |
| windows > the window is read as the job starts: a job that left it while waiting is not capped | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/queue.test.ts | |||||
| a stale hook that pushes or releases > mid-expiry: every expired job is stale once, none skipped, after the list is compacted under it | Unit, Browser | pass | pass | pass | pass |
| a stale hook that pushes or releases > when the owner closes: every waiting job is stale once | Unit, Browser | pass | pass | pass | pass |
| cancel > a waiting job leaves at once and is stale; a started one is untouched | Unit, Browser | pass | pass | pass | pass |
| deadline > a deadline pushed after the timer went (cancelled or expired) arms a new one | Unit, Browser | pass | pass | pass | pass |
| deadline > a job still waiting at its deadline is stale and never starts | Unit, Browser | pass | pass | pass | pass |
| deadline > a job with a deadline still goes stale on time after another waiting job is cancelled | Unit, Browser | pass | pass | pass | pass |
| deadline > after the list compacts, a job past its deadline is still passed over | Unit, Browser | pass | pass | pass | pass |
| deadline > many deadlines share one timer, each settles at its own time, and none is left | Unit, Browser | pass | pass | pass | pass |
| deadline > one whose deadline came is passed over at a release, even before its timer ran | Unit, Browser | pass | pass | pass | pass |
| deadline > the timer goes once no job with a deadline waits | Unit, Browser | pass | pass | pass | pass |
| max > a place is its job’s, given back once: a second release frees no other job’s place | Unit, Browser | pass | pass | pass | pass |
| max > a start that pushes or releases inside the drain keeps the order and the cap | Unit, Browser | pass | pass | pass | pass |
| max > at most max start; a release hands its place to the next in the same step | Unit, Browser | pass | pass | pass | pass |
| max > first come, first served | Unit, Browser | pass | pass | pass | pass |
| options > a bad max is refused with machine_bad_option | Unit, Browser | pass | pass | pass | pass |
| stale > a stale hook that throws is reported, and the other waiting jobs still go stale and none hangs | Unit, Browser | pass | pass | pass | pass |
| start > a start that throws gives its place back: the next job starts in it | Unit, Browser | pass | pass | pass | pass |
| start > a start that throws is reported, and the jobs after it still start | Unit, Browser | pass | pass | pass | pass |
| the queue's owner > closing it makes every waiting job stale, and a job pushed after is stale at once | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/random-port-secure.node.test.ts | |||||
| no seeded generator ships > no package's source imports the simulator, whose seeded generator it is | Unit | pass | not run | not run | not run |
| no seeded generator ships > the ports' bytes and uuid read only the platform's crypto | Unit | pass | not run | not run | not run |
| random.bytes and random.uuid are Web Crypto > a uuid is crypto.randomUUID, and Math.random is never read | Unit | pass | not run | not run | not run |
| random.bytes and random.uuid are Web Crypto > bytes are crypto.getRandomValues, and Math.random is never read | Unit | pass | not run | not run | not run |
| random.bytes and random.uuid are Web Crypto > with no Web Crypto at all, bytes and uuid throw rather than fall back | Unit | pass | not run | not run | not run |
| random.bytes and random.uuid are Web Crypto > without randomUUID (a page not on HTTPS), a uuid is made from crypto.getRandomValues | Unit | pass | not run | not run | not run |
packages/machine/test/random.test.ts | |||||
| random runs agree with the model > 2000 seeds × 120 steps | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/registry.test.ts | |||||
| definer calls: each module run owns what it defines > a module's next run ends its last one: a definition the new run does not make is gone | Unit, Browser | pass | pass | pass | pass |
| definer calls: each module run owns what it defines > another module's run does not end this one's | Unit, Browser | pass | pass | pass | pass |
| definer calls: each module run owns what it defines > defining() is restored after a nested call and after a throw | Unit, Browser | pass | pass | pass | pass |
| definer calls: each module run owns what it defines > inside a marked call, defining() is the run; outside, null | Unit, Browser | pass | pass | pass | pass |
| keyed registry: definitions by name, each owned by its defining module > a definition is found by its key; one set again under its key replaces the old | Unit, Browser | pass | pass | pass | pass |
| keyed registry: definitions by name, each owned by its defining module > an owner's end ends its definitions: one not set again is gone, one set again stays | Unit, Browser | pass | pass | pass | pass |
| keyed registry: definitions by name, each owned by its defining module > another module cannot take a definition away by ending: only its own go | Unit, Browser | pass | pass | pass | pass |
| keyed registry: definitions by name, each owned by its defining module > setting with an owner that already ended is refused | Unit, Browser | pass | pass | pass | pass |
| keyed registry: definitions by name, each owned by its defining module > the definitions walk in the order they were last set, live | Unit, Browser | pass | pass | pass | pass |
| registry: live entries, each owned > a snapshot is every entry in add order, not cut short by a removal while it is walked | Unit, Browser | pass | pass | pass | pass |
| registry: live entries, each owned > a snapshot is the same array until an entry is added or removed | Unit, Browser | pass | pass | pass | pass |
| registry: live entries, each owned > adding with an owner that already ended is refused: nothing is added | Unit, Browser | pass | pass | pass | pass |
| registry: live entries, each owned > an entry removed while the registry is walked is not walked after | Unit, Browser | pass | pass | pass | pass |
| registry: live entries, each owned > an owner ending removes exactly its own entries | Unit, Browser | pass | pass | pass | pass |
| registry: live entries, each owned > iterates in add order | Unit, Browser | pass | pass | pass | pass |
| registry: live entries, each owned > nothing is ever evicted: as many entries as their owners keep | Unit, Browser | pass | pass | pass | pass |
| registry: live entries, each owned > the removal takes its entry out, once, and leaves nothing behind in its owner | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/say.test.ts | |||||
| say() > 10,000 distinct keys keep at most the bound | Unit, Browser | pass | pass | pass | pass |
| say() > a bound that is not a whole number above 0 is refused | Unit, Browser | pass | pass | pass | pass |
| say() > a failure after a recovery is said again: once per failing streak | Unit, Browser | pass | pass | pass | pass |
| say() > a key that comes again is kept over one said once long ago, when the bound lets one go | Unit, Browser | pass | pass | pass | pass |
| say() > remembers 1024 keys by default | Unit, Browser | pass | pass | pass | pass |
| say() > says a key once, however often it comes | Unit, Browser | pass | pass | pass | pass |
| say() > says each key once: once per key | Unit, Browser | pass | pass | pass | pass |
| warn_once > 10,000 distinct warnings keep at most 1024: the oldest is said again | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/scope.test.ts | |||||
| a machine visit is a scope > a move that throws from its cleanups names the machine | Unit, Browser | pass | pass | pass | pass |
| a machine visit is a scope > a stopped machine’s scope is closed: work does not run, cleanups run at once | Unit, Browser | pass | pass | pass | pass |
| a machine visit is a scope > a visit nothing hangs work on makes no scope | Unit, Browser | pass | pass | pass | pass |
| a machine visit is a scope > one scope per visit: the same through the visit, closed by leaving, a new one next time | Unit, Browser | pass | pass | pass | pass |
| a machine visit is a scope > what a visit holds is let go when the machine leaves: listeners, timers, observers | Unit, Browser | pass | pass | pass | pass |
| children > a child can close sooner on its own, and the parent then lets go of it | Unit, Browser | pass | pass | pass | pass |
| children > a cleanup that gives the closing scope more work gets the closed behaviour | Unit, Browser | pass | pass | pass | pass |
| children > a closed scope’s child is closed | Unit, Browser | pass | pass | pass | pass |
| children > a long-lived parent holds none of the children that closed on their own | Unit, Browser | pass | pass | pass | pass |
| children > close before the parent’s own cleanups, newest first | Unit, Browser | pass | pass | pass | pass |
| children > what a child throws is thrown by the parent’s close, after its own cleanups ran | Unit, Browser | pass | pass | pass | pass |
| close > a cleanup given to a closed scope runs at once | Unit, Browser | pass | pass | pass | pass |
| close > a cleanup that throws does not stop the others; close throws it after all have run | Unit, Browser | pass | pass | pass | pass |
| close > a release that throws does not stop the other releases or the cleanups (#346)#346 | Unit, Browser | pass | pass | pass | pass |
| close > is safe to call twice, and says it closed | Unit, Browser | pass | pass | pass | pass |
| close > more than one throws: an AggregateError, newest first | Unit, Browser | pass | pass | pass | pass |
| close > runs cleanups once, newest first | Unit, Browser | pass | pass | pass | pass |
| close > works with `using` | Unit, Browser | pass | pass | pass | pass |
| on > a capture listener given as an object is let go on close; so is a non-capture one with options | Unit, Browser | pass | pass | pass | pass |
| on > a closed scope does not listen at all | Unit, Browser | pass | pass | pass | pass |
| on > a once listener that fired lets go of itself: a long-lived scope does not pile them up (#348)#348 | Unit, Browser | pass | pass | pass | pass |
| on > a real window listener is gone after close | Unit, Browser | skip | pass | pass | pass |
| on > keeps the listener options (capture, once) and lets go early when asked | Unit, Browser | pass | pass | pass | pass |
| on > listens on a Node-style emitter (on / off) | Unit, Browser | pass | pass | pass | pass |
| on > listens on an event target until the scope closes | Unit, Browser | pass | pass | pass | pass |
| signal > a child’s signal aborts before its parent’s | Unit, Browser | pass | pass | pass | pass |
| signal > a scope nothing asks a signal of makes no abort controller | Unit, Browser | pass | pass | pass | pass |
| signal > aborts on close, before the cleanups run | Unit, Browser | pass | pass | pass | pass |
| signal > is one signal for the scope’s life; a closed scope’s is already aborted | Unit, Browser | pass | pass | pass | pass |
| task > a closed scope does not run work | Unit, Browser | pass | pass | pass | pass |
| task > a failure while open rejects; a throw at once too | Unit, Browser | pass | pass | pass | pass |
| task > an answer or a failure after the scope closed is STALE | Unit, Browser | pass | pass | pass | pass |
| task > gives the answer while the scope is open | Unit, Browser | pass | pass | pass | pass |
| task > settles with STALE the moment the scope closes, even when work never finishes | Unit, Browser | pass | pass | pass | pass |
| task > work that closes its own scope before it returns still settles with STALE (#349)#349 | Unit, Browser | pass | pass | pass | pass |
| timers > 'frame' and 'idle' run once (a frame, idle time, or the next task where there is none) | Unit, Browser | pass | pass | pass | pass |
| timers > 'frame' waits for the host's frame and 'idle' for its idle time; closing cancels each | Unit, Browser | pass | pass | pass | pass |
| timers > a closed scope sets no timer | Unit, Browser | pass | pass | pass | pass |
| timers > a fired timeout lets go of itself: a long-lived scope does not pile them up | Unit, Browser | pass | pass | pass | pass |
| timers > closing clears a timeout that has not run; its cancel does too | Unit, Browser | pass | pass | pass | pass |
| timers > every repeats until the scope closes | Unit, Browser | pass | pass | pass | pass |
| timers > refuses a time a timer cannot hold | Unit, Browser | pass | pass | pass | pass |
| timers > timeout runs once after its time, real timers | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > `await using` gets the errors of an async disposal; a plain close reports them | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > `await using` throws what a cleanup threw | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > `await using` whose cleanup throws still waits for the async disposals, then throws both together | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > a real MutationObserver stops hearing changes after close | Unit, Browser | skip | pass | pass | pass |
| watch and adopt > a task whose work closes its own scope and then fails is STALE, its failure never unhandled | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > adopts what disposes itself, sync or async | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > an async disposal adopted by a cleanup of the close goes with the close: `await using` gets its error | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > an async disposal adopted by a closed scope runs at once, is said when it fails, and is not kept (#347)#347 | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > disconnects an observer on close (at once on a closed scope) | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > disposes at once on a closed scope | Unit, Browser | pass | pass | pass | pass |
| watch and adopt > refuses what cannot dispose itself | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/slot.test.ts | |||||
| slot > a copy at another version is refused in dev: both versions named | Unit, Browser | pass | pass | pass | pass |
| slot > a name outside ogygia., one with a version suffix, or a bad version is refused | Unit, Browser | pass | pass | pass | pass |
| slot > makes the value once, and every later call (another copy) gets the same one | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/stage-commit-while-closing.test.ts | |||||
| a commit asked for while the owner closes (from the build’s abort) is refused, and the build is given back | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/stage.test.ts | |||||
| a commit in progress > a commit that closes its owner and then throws still puts everything back | Unit, Browser | pass | pass | pass | pass |
| a commit in progress > a commit that closes its owner keeps what it committed (#343)#343 | Unit, Browser | pass | pass | pass | pass |
| after the commit > a commit ends the stage in committed | Unit, Browser | pass | pass | pass | pass |
| after the commit > a discard step given after a discard runs at once | Unit, Browser | pass | pass | pass | pass |
| after the commit > a discard step given after the commit is dropped, not run (#344)#344 | Unit, Browser | pass | pass | pass | pass |
| after the commit > a stage that committed or was discarded leaves nothing on its owner (#345)#345 | Unit, Browser | pass | pass | pass | pass |
| after the commit > an ended stage keeps none of its discard steps, not even one given late | Unit, Browser | pass | pass | pass | pass |
| after the commit > discard and undo steps run newest first | Unit, Browser | pass | pass | pass | pass |
| an owner that closes first > an owner already closed never builds | Unit, Browser | pass | pass | pass | pass |
| an owner that closes first > ready is STALE at once, and what the build made so far is given back | Unit, Browser | pass | pass | pass | pass |
| an owner that closes first > the build’s signal aborts when the owner closes | Unit, Browser | pass | pass | pass | pass |
| build and commit > a commit after the owner closed is refused, and the build is given back | Unit, Browser | pass | pass | pass | pass |
| build and commit > a committed stage gives nothing back when its owner closes | Unit, Browser | pass | pass | pass | pass |
| build and commit > builds off to the side, then switches in at once | Unit, Browser | pass | pass | pass | pass |
| failures > a build that throws gives back what it made, and ready rejects | Unit, Browser | pass | pass | pass | pass |
| failures > a commit that throws puts back what it changed, gives back the build, and throws | Unit, Browser | pass | pass | pass | pass |
| failures > a step that throws is said once, and the others still run | Unit, Browser | pass | pass | pass | pass |
| failures > refuses a build or commit that is not a function | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/stale-waits.test.ts | |||||
| a stale part makes the whole wait stale (#378) > a flights run: its callers get STALE, and nothing is kept (#377)#378 | Unit, Browser | pass | pass | pass | pass |
| a stale part makes the whole wait stale (#378) > a fresh flight that answers STALE gives the kept answer back#378 | Unit, Browser | pass | pass | pass | pass |
| a stale part makes the whole wait stale (#378) > a machine visit’s scope.task#378 | Unit, Browser | pass | pass | pass | pass |
| a stale part makes the whole wait stale (#378) > a mailbox turn’s wait, an outside wait and an ask#378 | Unit, Browser | pass | pass | pass | pass |
| a stale part makes the whole wait stale (#378) > a STALE answer of its own: the wait is STALE, and nothing is kept (#377)#378 | Unit, Browser | pass | pass | pass | pass |
| a stale part makes the whole wait stale (#378) > scope.task#378 | Unit, Browser | pass | pass | pass | pass |
| a stale part makes the whole wait stale (#378) > stage().ready#378 | Unit, Browser | pass | pass | pass | pass |
| a stale part makes the whole wait stale (#378) > under_policy#378 | Unit, Browser | pass | pass | pass | pass |
| only one level deep, only arrays > an array with no STALE comes through as it is | Unit, Browser | pass | pass | pass | pass |
| only one level deep, only arrays > objects and nested arrays are not scanned | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/storage-port.test.ts | |||||
| storage that throws as it is read is no storage | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/testing-entry.node.test.ts | |||||
| @ogygia/machine/testing: a test-only entry > is its own export, in the workspace and in the published package | Unit | pass | not run | not run | not run |
| @ogygia/machine/testing: a test-only entry > the runtime entry never imports it | Unit | pass | not run | not run | not run |
packages/machine/test/trace.test.ts | |||||
| trace() > forgets its lines on clear(), and keeps numbering | Unit, Browser | pass | pass | pass | pass |
| trace() > hears nothing after stop(), and keeps what it heard | Unit, Browser | pass | pass | pass | pass |
| trace() > keeps the last `max` lines and says how many it let go | Unit, Browser | pass | pass | pass | pass |
| trace() > records only the names `only` accepts | Unit, Browser | pass | pass | pass | pass |
| trace() > stops at the end of a `using` block | Unit, Browser | pass | pass | pass | pass |
| trace() > writes `stopped` when a machine stops | Unit, Browser | pass | pass | pass | pass |
| trace() > writes each move as `name#n from -> to`, numbering each machine per name as it first moves | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/types.test.ts | |||||
| types > a stale part makes the whole wait stale: past the check, no slot is Stale (#378)#378 | Unit, Browser | pass | pass | pass | pass |
| types > after: a timeout takes one of its state’s steps, with the data that state needs | Unit, Browser | pass | pass | pass | pass |
| types > create takes the initial state data when it has some | Unit, Browser | pass | pass | pass | pass |
| types > flights: one key takes no input, a keyed one its input, answers may be STALE | Unit, Browser | pass | pass | pass | pass |
| types > go takes only states some step leads to, with their data | Unit, Browser | pass | pass | pass | pass |
| types > graph and paths name the states | Unit, Browser | pass | pass | pass | pass |
| types > lock | Unit, Browser | pass | pass | pass | pass |
| types > move checks the step itself | Unit, Browser | pass | pass | pass | pass |
| types > now is a union that narrows on kind | Unit, Browser | pass | pass | pass | pass |
| types > scope: listeners get the event their target names | Unit, Browser | pass | pass | pass | pass |
| types > task gives the answer or STALE | Unit, Browser | pass | pass | pass | pass |
| types > the definition is checked as it is written | Unit, Browser | pass | pass | pass | pass |
| types > wait gives that state or STALE | Unit, Browser | pass | pass | pass | pass |
packages/machine/test/world.test.ts | |||||
| a world > a key moved again goes to the back of the line: past KEYS_KEPT, the oldest move folds, not its newest | Unit, Browser | pass | pass | pass | pass |
| a world > a key moved again is the newest in line: the next fold takes an older key | Unit, Browser | pass | pass | pass | pass |
| a world > a keyed world moves only what read the keys it moved | Unit, Browser | pass | pass | pass | pass |
| a world > a stamp from the future is never fresh | Unit, Browser | pass | pass | pass | pass |
| a world > a stamp is fresh until the world moves, and only moves forward | Unit, Browser | pass | pass | pass | pass |
| a world > a watcher hears each move, the keys it moved or null, until it stops watching | Unit, Browser | pass | pass | pass | pass |
| a world > a watcher let go hears no more moves, and its owner is no longer watched for collection | Unit, Browser | pass | pass | pass | pass |
| a world > a whole move is never undone by a later key folding into the floor | Unit, Browser | pass | pass | pass | pass |
| a world > a whole move of a keyed world puts every stamp before it out of date | Unit, Browser | pass | pass | pass | pass |
| a world > an empty move moves nothing | Unit, Browser | pass | pass | pass | pass |
| a world > one move of more than KEYS_KEPT keys folds into the floor: out of date for every key, never fresh by mistake | Unit, Browser | pass | pass | pass | pass |
| a world > past KEYS_KEPT keys, the oldest move folds into the floor: never fresh when it is not | Unit, Browser | pass | pass | pass | pass |
| flights in a world > a disposed flights lets go of its world: the world holds no watcher for it | Unit, Browser | pass | pass | pass | pass |
| flights in a world > a disposed flights stops hearing its world | Unit, Browser | pass | pass | pass | pass |
| flights in a world > a keyed move drops the kept answers made from its keys, and only those | Unit, Browser | pass | pass | pass | pass |
| flights in a world > a move drops the kept answers and ends the flights out: their callers get STALE | Unit, Browser | pass | pass | pass | pass |
| flights in a world > a move of other keys keeps the flight out and its answer (#294)#294 | Unit, Browser | pass | pass | pass | pass |
| flights in a world > a refresh beside a kept answer: an answer made stale on the way leaves the kept one | Unit, Browser | pass | pass | pass | pass |
| flights in a world > a touches that throws: the kept answer goes on a move, a landing fails its callers | Unit, Browser | pass | pass | pass | pass |
| flights in a world > an answer whose world moved on its way is STALE for every joiner, and not kept | Unit, Browser | pass | pass | pass | pass |
| flights in a world > takes only a world made by world() | Unit, Browser | pass | pass | pass | pass |
| flights in a world > with no touches, a move of some keys still ends the flights out at once | Unit, Browser | pass | pass | pass | pass |
| flights in a world > with touches, a whole move drops every kept answer and ends the flights out | Unit, Browser | pass | pass | pass | pass |