Changelog - 2026-10-28
assertApplicationBoots proves an application boots without infrastructure
New Feature Bug Fix EnhancementIn one line. A test can run an application's real boot with no database, port or network, and fails with the error boot raises. New apps get it as src/boot.test.ts; an existing app can add it. Ships in 0.4.4, with two fixes in 0.4.5.
What changed
assertApplicationBoots(application | () => application, options?)in@venizia/ignis/testing(not in the root barrel). It runsinit()andinitialize(), neverstart(), so no socket opens and no post-start hook runs.- Datasources are skipped, components run. Every datasource is bound and resolved but its
configure()does not run unless you name it inkeepDataSources. A component runs unless you name it inskipComponents.hydrateSecretsandwireSecretRotatablesare skipped by default, so a secrets provider is never contacted;skipStepsreplaces that default. - It fails the way boot fails. An unregistered injection rejects with
Binding key: services.X is not bounded in context!.verifyBindingsis on by default, so an injection nobody references at boot fails too. An application with no controller is rejected. - A duplicate-route check of its own. IGNIS boot raises no error when two controllers mount the same method and path. The helper does, naming both controllers;
routes: falseturns it off. skipBindings. The helper takes a list of services or repositories the verification leaves out; a name that matches nothing rejects.- One shared check in
@venizia/ignis-inversion.verifyBindingsandassertBindingsResolveresolve every binding of the namespaces you name and report what is missing and who needs it. The kernel'sverifyBindingsboot step (bootChecks.binding.doVerify) uses the same check, so both throw[verifyBindings] N binding(s) cannot be resolved | <key>: <message>, withextra.missingmapping each missing key to the bindings that need it. The message text is unchanged;extrais new.Container.getnow also setsextra.unboundKeyon its "not bounded" error. - Fixed in 0.4.5: no false duplicates. A route with an authenticate step, an authorize step or a validator was reported as mounted more than once. A controller now counts once per method and path. A real duplicate is still reported: two different controllers on the same method and path, or one controller that declares the same method and path twice through decorators (the message then says
(declared 2 times)). Not detected: a method and path a controller declares twice insidebinding(). - New in 0.4.5: a hint when a component fails. When the boot rejects while a component's
configure()is running (for example one that opens Redis, Kafka or S3), the helper logs one warning naming it:skipComponents: ['Name']skips it, andskipBindingslists the services that depend on it. The rejection is never wrapped.
Who is affected
- Everyone. Nobody has to change anything. The verification now runs after the last boot step of a helper run, so when
validateScopeFilterSupportalso fails, its error comes first. - New apps from the
ignispreset have the test from the start. To add it to an existing app, copy the test from Prove the Application Boots intosrc/boot.test.ts; it needs your application exported fromsrc/application.ts. - A test that passed
{ routes: false }only to get past the false duplicate report. On 0.4.5 you can drop the option.
Details
What it does not prove: a wrong database URL or password, a migration, anything start() does, or code of your own that opens a connection while it boots.