Tests / @ogygia/jumpstart
@ogygia/jumpstart
65 test runs (65 tests, each run in Node, the browsers or both)
1.60× lines of test for each line of source (1,902 to 1,187) 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.2% of source lines run by the tests
- 54Unit
- 0Browser
- 11End to end
- 0Type tests
- 0Lint rules
- 0Failing
Coverage
- 96.2%Lines
- 88.4%Branches
- 91.5%Functions
- 95.0%Statements
Every test
65 tests
| Test | Kind | Node | Chromium | Firefox | WebKit |
|---|---|---|---|---|---|
../../../../../__w/ogygia/ogygia/packages/jumpstart/e2e/jumpstart.spec.ts | |||||
| a dependency that reads a file beside itself breaks its page bundled, and works listed in external | End to end | not run | pass | skip | skip |
| a dependency's module runs when its route first loads, as without jumpstart: never at server start or in Kit's build analysis | End to end | not run | pass | skip | skip |
| a light page never loads the registry chunk; the CMS page loads it and a handful of files | End to end | not run | pass | skip | skip |
| a server that awaits at its top level under an import cycle builds, again without strictExecutionOrder, and serves its pages as without jumpstart | End to end | not run | pass | skip | skip |
| an app with no regions builds with no registry chunk, its pages the same | End to end | not run | pass | skip | skip |
| dev is untouched: the dev server serves every page as without jumpstart | End to end | not run | pass | skip | skip |
| every page, and the hole it asks for, is served byte for byte as without jumpstart | End to end | not run | pass | skip | skip |
| on a Rolldown older than 1.3.3, every bundled dependency runs at server start, and the build says so in one coded line | End to end | not run | pass | skip | skip |
| the build says, in one coded line, what stayed outside the bundle and why | End to end | not run | pass | skip | skip |
| the registry's chunk holds every block, and nothing a Svelte module marks or the framework | End to end | not run | pass | skip | skip |
| the server build is a few files: the framework and dependencies in one, the registry in another | End to end | not run | pass | skip | skip |
packages/jumpstart/test/await-cycle.test.ts | |||||
| a top-level await a module keeps, as strictExecutionOrder renders it > is an await, a for await or an await using outside every function of the module | Unit | pass | not run | not run | not run |
| a top-level await a module keeps, as strictExecutionOrder renders it > is not an await in a branch the build drops, inside a function or a method | Unit | pass | not run | not run | not run |
| a top-level await a module keeps, as strictExecutionOrder renders it > is not the await of a module it imports, which awaits at its own top level | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > asks whether a module awaits only for the modules at or below a cycle | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > is found below a cycle, however deep: a module of the cycle imports one that imports the one that awaits | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > is found in a barrel that a module it re-exports imports back, when another module it re-exports awaits | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > is found when the module that awaits is in the cycle itself, or imports itself | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > is not found when no cycle sits above it: an await alone, or an await above a cycle | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > names the same module and cycle whatever order the graph lists them in | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > walks a long chain of modules without running out of stack | Unit | pass | not run | not run | not run |
packages/jumpstart/test/dependencies.test.ts | |||||
| dependencies > a directory with no package.json lists no dependency | Unit | pass | not run | not run | not run |
| dependencies > a linked package and the packages it links are dependencies, followed through each one's own | Unit | pass | not run | not run | not run |
| dependencies > an app inside the package it links is the app's code, the rest of that package a dependency | Unit | pass | not run | not run | not run |
packages/jumpstart/test/externals.test.ts | |||||
| the external report > counts packages only: relative paths, absolute paths and Node's own modules are not | Unit | pass | not run | not run | not run |
| the external report > names the package of a bare specifier | Unit | pass | not run | not run | not run |
| the external report > prints one coded line with every package and its reason, sorted | Unit | pass | not run | not run | not run |
| the external report > says so when every dependency is inside the bundle (never silent) | Unit | pass | not run | not run | not run |
| the external report > says why each package stayed out: the option first, then the Vite config, else Vite | Unit | pass | not run | not run | not run |
packages/jumpstart/test/options.test.ts | |||||
| options > a misspelled option fails the build instead of being ignored | Unit | pass | not run | not run | not run |
| options > external defaults to none, and a name listed twice is kept once | Unit | pass | not run | not run | not run |
| options > external that is not a list of names fails the build | Unit | pass | not run | not run | not run |
| options > jumpstart() is an ogygia plugin and a Vite plugin that applies to builds only | Unit | pass | not run | not run | not run |
packages/jumpstart/test/regions.test.ts | |||||
| region groups > a registry named like a reserved chunk (shared.ts, server.ts) never shares its name, so light pages never load it | Unit | pass | not run | not run | not run |
| region groups > a script registry gets one group: itself, its components and the modules minted for them | Unit | pass | not run | not run | not run |
| region groups > a Svelte module that marks regions gets no group, and a component it marks stays out of every group | Unit | pass | not run | not run | not run |
| region groups > cleans a module id: no NUL prefix, no query, forward slashes | Unit | pass | not run | not run | not run |
| region groups > no registry file name can produce a reserved chunk name | Unit | pass | not run | not run | not run |
| region groups > reads the live table again after reset (a second build sees regions found later) | Unit | pass | not run | not run | not run |
| region groups > two registries get a group each, a shared component goes with the first by path, and names never collide | Unit | pass | not run | not run | not run |
| the shared chunk > an entry that imports a block only through the registry shares nothing with it | Unit | pass | not run | not run | not run |
| the shared chunk > app code a registry and a page outside it both import is shared; what only the registry reaches is not | Unit | pass | not run | not run | not run |
packages/jumpstart/test/run-time.test.ts | |||||
| a top-level await under an import cycle > a build Vite's build() starts, which cannot build again, stops with a coded error naming the module and the cycle | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > keeps strictExecutionOrder when the await sits in a branch the build drops, as SvelteKit's own server runtime has one under its cycles | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > Rolldown's strictExecutionOrder still never finishes running it (rolldown/rolldown#9548), so jumpstart cannot turn it on for such a build | Unit | pass | not run | not run | not run |
| a top-level await under an import cycle > vite build builds the server again without strictExecutionOrder, which then runs as without jumpstart, and says why in one coded line | Unit | pass | not run | not run | not run |
| when a module runs, with jumpstart and without > a CommonJS library that a module only re-exports runs when a page needs it, not when another page loads a wrapper that requires it later | Unit | pass | not run | not run | not run |
| when a module runs, with jumpstart and without > a dependency a dynamically imported module shares with a route runs when the first of them loads, and a dependency of that route alone only with it | Unit | pass | not run | not run | not run |
| when a module runs, with jumpstart and without > a dependency one route imports before a dependency several routes share still runs first | Unit | pass | not run | not run | not run |
| when a module runs, with jumpstart and without > a dependency runs its own imports in its order: a polyfill it lists first runs before a library other pages share | Unit | pass | not run | not run | not run |
| when a module runs, with jumpstart and without > a difference: a dependency that awaits at its top level holds back the dependencies a page lists after it, which without jumpstart run while it waits | Unit | pass | not run | not run | not run |
| when a module runs, with jumpstart and without > a difference: a page runs its own module and a dependency in the order it lists them, in source order, where without jumpstart the dependency, imported from node_modules, runs first | Unit | pass | not run | not run | not run |
| when a module runs, with jumpstart and without > a page runs a dependency and its own imports before the next dependency it lists, when other pages share them in other sets | Unit | pass | not run | not run | not run |
| when a module runs, with jumpstart and without > a route that imports only a virtual module a dependency also imports never runs that dependency | Unit | pass | not run | not run | not run |
| when a module runs, with jumpstart and without > two dependencies that import each other run in the order of the side a page enters from | Unit | pass | not run | not run | not run |
packages/jumpstart/test/server-chunks.test.ts | |||||
| the server chunks > a dependency goes in the framework chunk, unless a region is built from it | Unit | pass | not run | not run | not run |
| the server chunks > a group named by module carries a debugName, so Rolldown prints no line asking for one | Unit | pass | not run | not run | not run |
| the server chunks > keeps the strictExecutionOrder the Vite config sets, on or off | Unit | pass | not run | not run | not run |
| the server chunks > keeps when each module runs on Rolldown 1.3.3 or later, and on an older one says, in one coded line, that every bundled dependency runs at server start | Unit | pass | not run | not run | not run |
| the server chunks > names a package for each common shape of a read beside its own module, after a regular expression too, and not for a package read by name, a read inside a comment or a name another function binds | Unit | pass | not run | not run | not run |
| the server chunks > on a Vite that gives no Rolldown version, says so and how to update, never "Rolldown undefined" | Unit | pass | not run | not run | not run |
| the server chunks > only the server environment of a build is shaped, each module run when it would run without jumpstart: the client build and dev get nothing | Unit | pass | not run | not run | not run |
| the server chunks > the build names, in one coded line, each bundled package that may read a file beside its own module | Unit | pass | not run | not run | not run |
| the server chunks > the built graph is read into the shared chunk | Unit | pass | not run | not run | not run |
| the server chunks > the external report skips the build’s own chunks and Node’s modules | Unit | pass | not run | not run | not run |