Tests / @ogygia/jumpstart

@ogygia/jumpstart

Version 0.17.0 latest
commit 31530eff
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

TestKindNodeChromiumFirefoxWebKit
../../../../../__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 externalEnd to endnot runpassskipskip
a dependency's module runs when its route first loads, as without jumpstart: never at server start or in Kit's build analysisEnd to endnot runpassskipskip
a light page never loads the registry chunk; the CMS page loads it and a handful of filesEnd to endnot runpassskipskip
a server that awaits at its top level under an import cycle builds, again without strictExecutionOrder, and serves its pages as without jumpstartEnd to endnot runpassskipskip
an app with no regions builds with no registry chunk, its pages the sameEnd to endnot runpassskipskip
dev is untouched: the dev server serves every page as without jumpstartEnd to endnot runpassskipskip
every page, and the hole it asks for, is served byte for byte as without jumpstartEnd to endnot runpassskipskip
on a Rolldown older than 1.3.3, every bundled dependency runs at server start, and the build says so in one coded lineEnd to endnot runpassskipskip
the build says, in one coded line, what stayed outside the bundle and whyEnd to endnot runpassskipskip
the registry's chunk holds every block, and nothing a Svelte module marks or the frameworkEnd to endnot runpassskipskip
the server build is a few files: the framework and dependencies in one, the registry in anotherEnd to endnot runpassskipskip
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 moduleUnitpassnot runnot runnot 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 methodUnitpassnot runnot runnot 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 levelUnitpassnot runnot runnot run
a top-level await under an import cycle > asks whether a module awaits only for the modules at or below a cycleUnitpassnot runnot runnot 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 awaitsUnitpassnot runnot runnot 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 awaitsUnitpassnot runnot runnot run
a top-level await under an import cycle > is found when the module that awaits is in the cycle itself, or imports itselfUnitpassnot runnot runnot 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 cycleUnitpassnot runnot runnot run
a top-level await under an import cycle > names the same module and cycle whatever order the graph lists them inUnitpassnot runnot runnot run
a top-level await under an import cycle > walks a long chain of modules without running out of stackUnitpassnot runnot runnot run
packages/jumpstart/test/dependencies.test.ts
dependencies > a directory with no package.json lists no dependencyUnitpassnot runnot runnot run
dependencies > a linked package and the packages it links are dependencies, followed through each one's ownUnitpassnot runnot runnot run
dependencies > an app inside the package it links is the app's code, the rest of that package a dependencyUnitpassnot runnot runnot run
packages/jumpstart/test/externals.test.ts
the external report > counts packages only: relative paths, absolute paths and Node's own modules are notUnitpassnot runnot runnot run
the external report > names the package of a bare specifierUnitpassnot runnot runnot run
the external report > prints one coded line with every package and its reason, sortedUnitpassnot runnot runnot run
the external report > says so when every dependency is inside the bundle (never silent)Unitpassnot runnot runnot run
the external report > says why each package stayed out: the option first, then the Vite config, else ViteUnitpassnot runnot runnot run
packages/jumpstart/test/options.test.ts
options > a misspelled option fails the build instead of being ignoredUnitpassnot runnot runnot run
options > external defaults to none, and a name listed twice is kept onceUnitpassnot runnot runnot run
options > external that is not a list of names fails the buildUnitpassnot runnot runnot run
options > jumpstart() is an ogygia plugin and a Vite plugin that applies to builds onlyUnitpassnot runnot runnot 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 itUnitpassnot runnot runnot run
region groups > a script registry gets one group: itself, its components and the modules minted for themUnitpassnot runnot runnot run
region groups > a Svelte module that marks regions gets no group, and a component it marks stays out of every groupUnitpassnot runnot runnot run
region groups > cleans a module id: no NUL prefix, no query, forward slashesUnitpassnot runnot runnot run
region groups > no registry file name can produce a reserved chunk nameUnitpassnot runnot runnot run
region groups > reads the live table again after reset (a second build sees regions found later)Unitpassnot runnot runnot run
region groups > two registries get a group each, a shared component goes with the first by path, and names never collideUnitpassnot runnot runnot run
the shared chunk > an entry that imports a block only through the registry shares nothing with itUnitpassnot runnot runnot run
the shared chunk > app code a registry and a page outside it both import is shared; what only the registry reaches is notUnitpassnot runnot runnot 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 cycleUnitpassnot runnot runnot 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 cyclesUnitpassnot runnot runnot 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 buildUnitpassnot runnot runnot 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 lineUnitpassnot runnot runnot 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 laterUnitpassnot runnot runnot 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 itUnitpassnot runnot runnot run
when a module runs, with jumpstart and without > a dependency one route imports before a dependency several routes share still runs firstUnitpassnot runnot runnot 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 shareUnitpassnot runnot runnot 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 waitsUnitpassnot runnot runnot 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 firstUnitpassnot runnot runnot 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 setsUnitpassnot runnot runnot run
when a module runs, with jumpstart and without > a route that imports only a virtual module a dependency also imports never runs that dependencyUnitpassnot runnot runnot 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 fromUnitpassnot runnot runnot run
packages/jumpstart/test/server-chunks.test.ts
the server chunks > a dependency goes in the framework chunk, unless a region is built from itUnitpassnot runnot runnot run
the server chunks > a group named by module carries a debugName, so Rolldown prints no line asking for oneUnitpassnot runnot runnot run
the server chunks > keeps the strictExecutionOrder the Vite config sets, on or offUnitpassnot runnot runnot 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 startUnitpassnot runnot runnot 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 bindsUnitpassnot runnot runnot run
the server chunks > on a Vite that gives no Rolldown version, says so and how to update, never "Rolldown undefined"Unitpassnot runnot runnot 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 nothingUnitpassnot runnot runnot run
the server chunks > the build names, in one coded line, each bundled package that may read a file beside its own moduleUnitpassnot runnot runnot run
the server chunks > the built graph is read into the shared chunkUnitpassnot runnot runnot run
the server chunks > the external report skips the build’s own chunks and Node’s modulesUnitpassnot runnot runnot run