Tests / @ogygia/bake
@ogygia/bake
Version 0.14.0 latest
620ddcca 33 test runs (33 tests, each run in Node, the browsers or both)
0.86× lines of test for each line of source (435 to 505) 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)88.4% of source lines run by the tests
- 33Unit
- 0Browser
- 0End to end
- 0Type tests
- 0Lint rules
- 0Failing
Coverage
- 88.4%Lines
- 69.6%Branches
- 86.8%Functions
- 87.1%Statements
Every test
33 tests
| Test | Kind | Node | Chromium | Firefox | WebKit |
|---|---|---|---|---|---|
packages/bake/test/bake.test.ts | |||||
| rewrite_bake — dev: an edited input bakes fresh > an edited data module bakes its new value, with the same entry text | Unit | pass | not run | not run | not run |
| rewrite_bake — dev: an edited input bakes fresh > many bakes of one module at once all land, none breaks another | Unit | pass | not run | not run | not run |
| rewrite_bake — dev: an edited input bakes fresh > names every module the bake bundled as a file to watch | Unit | pass | not run | not run | not run |
| rewrite_bake — real build-time evaluation > a non-serializable result is a build error naming the fix | Unit | pass | not run | not run | not run |
| rewrite_bake — real build-time evaluation > awaits an async bake fn | Unit | pass | not run | not run | not run |
| rewrite_bake — real build-time evaluation > drops an import that only fed a baked fn (ship the answer, not the computation) | Unit | pass | not run | not run | not run |
| rewrite_bake — real build-time evaluation > executes an imported fn at build and inlines its devalue-serialized result (Date survives) | Unit | pass | not run | not run | not run |
| rewrite_bake — real build-time evaluation > KEEPS an import still used outside the baked fn | Unit | pass | not run | not run | not run |
| rewrite_bake — validation (no execution) > ignores the marker inside a comment or string | Unit | pass | not run | not run | not run |
| rewrite_bake — validation (no execution) > rejects a non-function argument | Unit | pass | not run | not run | not run |
| rewrite_bake — validation (no execution) > rejects wrong arity | Unit | pass | not run | not run | not run |
| rewrite_bake — validation (no execution) > returns the same reference when there is no bake call | Unit | pass | not run | not run | not run |
packages/bake/test/plugin.test.ts | |||||
| bake() beside ogygia() > bakes the call through the app alias, and the import that fed it leaves the bundle | Unit | pass | not run | not run | not run |
| bake() beside ogygia() > the module a bake bundled is a watch file of the build, so an edit to it re-bakes | Unit | pass | not run | not run | not run |
| bake() beside ogygia() > without bake() the build fails with macro_needs_plugin, and nothing runs | Unit | pass | not run | not run | not run |
packages/bake/test/stress.test.ts | |||||
| bake — byte-offset integrity under multi-byte unicode > TWO bake() calls interleaved with unicode both inline at the right spots | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > a CIRCULAR structure serializes (devalue references) | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > a fn that THROWS at build surfaces as a build error | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > a frozen object and a 10k-element array both inline | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > a function in the result FAILS LOUDLY | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > a Symbol in the result FAILS LOUDLY | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > an async fn using await Promise.all([...]) resolves | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > Date, Map, Set, RegExp round-trip | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > exotic primitives: undefined, NaN, Infinity, -0, BigInt | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > nested + sparse arrays and unicode strings | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > nested Map-of-Sets and a getter (evaluated) serialize | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > referencing an undeclared/non-imported name FAILS LOUDLY | Unit | pass | not run | not run | not run |
| bake — devalue serialization torture (real execution) > typed array (Uint8Array) and ArrayBuffer serialize | Unit | pass | not run | not run | not run |
| bake — resolution depth (real execution, real files) > a fn importing a sibling that imports another sibling (transitive) | Unit | pass | not run | not run | not run |
| bake — resolution depth (real execution, real files) > a fn importing and using a node: builtin | Unit | pass | not run | not run | not run |
| bake in .svelte — component import excluded from the eval bundle > the .svelte component import stays out of the Node eval; the bake still resolves its data | Unit | pass | not run | not run | not run |
| misuse-error QUALITY — build-voice, file:line, explains the fix > bake with a non-function arg → must be a function + line | Unit | pass | not run | not run | not run |
| misuse-error QUALITY — build-voice, file:line, explains the fix > bake with wrong arity → takes exactly one argument | Unit | pass | not run | not run | not run |