interface Config
extends ParsedFlags

Full resolved qunitx configuration for a single run, merging package.json settings, CLI flags, and runtime state. Most fields are read-only after Config.setup() resolves; underscore-prefixed fields are mutable runtime slots populated during the run lifecycle.

// Defined, not invoked: a full Config is assembled by Config.setup, not by hand.
function testServerUrl(config: Config) {
  return `http://localhost:${config.port}`;
}

Properties

Mutable state for this run; see RunState for the sharing rules.

output: string

Directory where the compiled test bundle and output HTML are written (default: 'tmp').

timeout: number

Maximum milliseconds to wait for the full test suite before timing out (default: 20000).

failFast: boolean

When true, abort the run after the first test failure (default: false).

port: number

TCP port the local test server listens on (default: 1234, auto-increments on conflict).

extensions: string[]

File extensions treated as test files (default: ['js', 'ts']).

browser: "chromium" | "firefox" | "webkit"

Browser engine used for the test run ('chromium' | 'firefox' | 'webkit').

Absolute path to the project root (directory containing package.json).

cwd: string

Working directory this run resolves against: relative inputs, bare-specifier resolution inside the test bundle, and --before/--after hook paths. process.cwd() for the CLI; the JS API's cwd option otherwise. Distinct from projectRoot, which is wherever the nearest package.json sits — running from a subdirectory keeps that subdirectory's node_modules on the resolution chain, exactly as Node itself would.

htmlPaths: string[]

Absolute paths to HTML fixture files that wrap the compiled test bundle.

Paths searched when globbing for test files.

Current file-system snapshot, diffed in watch mode to detect added / removed files.

optional
plugins: EsbuildPlugin[]

Custom esbuild plugins applied during the test bundle build. Loaded from qunitx.config.{ts,js,mjs} in the project root. Common use cases: SFC formats like .vue (esbuild-plugin-vue-next), Svelte (esbuild-svelte), or any project-specific resolvers/loaders.

The run's HTTP server, exposed purely as --before / --after hook surface — qunitx itself never reads it back. Hooks use it to register extra routes (mock APIs) before tests start.