interface TestAppFromPlugins
Since 0.6.0

Hand-assembled arm of TestAppOptions: the test names the plugins it wants and gets nothing else.

Use this for unit scope — a route, a middleware, one plugin in isolation. For anything whose behaviour depends on how the application is composed, prefer TestAppFromApp, which builds from the project's own composition root instead of a second, divergent one.

Properties

optional
plugins: IPlugin[]

Plugins to pre-register before start(). Must include a runtime capability provider (RuntimePlugin() or a mock providing CAPABILITIES.RUNTIME) when autoStart is true — the kernel throws otherwise.

Defaults to [], which is only usable with autoStart: false.

optional
autoStart: boolean

Whether to auto-start the application.

  • true (default): calls await app.start() before returning.
  • false: returns the un-started app, required both to register more plugins (register() throws once started) and to add global middleware (middleware.add throws after start() compiles the pipeline).
optional
app: never

Not available on this arm — supply plugins or app, never both.

optional
without: never

Not available on this arm — supply plugins or app, never both.

optional
overrides: never

Not available on this arm — supply plugins or app, never both.

Usage

import { type TestAppFromPlugins } from "testing/src/index.ts";