Skip to content

Lupa API Reference / @pawel-up/lupa/runner / BaseConfig

Interface: BaseConfig

Defined in: src/runner/types.ts:211

Base configuration options

Properties

concurrency?

optional concurrency?: number | "auto"

Defined in: src/runner/types.ts:336

Number of concurrent pages to run per browser. Can be 'auto' or a specific number.


coverage?

optional coverage?: boolean | CoverageOptions

Defined in: src/runner/types.ts:320

Whether to enable code coverage reporting using istanbul, or specific options to configure the coverage instrumentation.


cwd?

optional cwd?: string

Defined in: src/runner/types.ts:216

Current working directory. It is required to search for the test files


exclude?

optional exclude?: string[]

Defined in: src/runner/types.ts:302

An array of directories to exclude when searching for test files.

For example, if you search for test files inside the entire project, you might want to exclude "node_modules"


filters?

optional filters?: Filters

Defined in: src/runner/types.ts:236

Test filters to apply


forceExit?

optional forceExit?: boolean

Defined in: src/runner/types.ts:282

Enable/disable force exiting.


harness?

optional harness?: HarnessConfig

Defined in: src/runner/types.ts:325

Customize the HTML harness environment


importer?

optional importer?: (filePath) => void | Promise<void>

Defined in: src/runner/types.ts:271

A custom implementation to import test files.

Parameters

filePath

URL

Returns

void | Promise<void>


list?

optional list?: boolean

Defined in: src/runner/types.ts:341

Whether to output the list of suites and tests


parallel?

optional parallel?: boolean

Defined in: src/runner/types.ts:330

Whether to run tests in parallel across browsers and pages


refiner?

optional refiner?: Refiner

Defined in: src/runner/types.ts:277

Overwrite tests refiner. Check documentation for refiner usage


reporters?

optional reporters?: object

Defined in: src/runner/types.ts:245

A hook to configure suites. The callback will be called for each suite before it gets executed. A collection of registered reporters. Reporters are not activated by default. Either you have to activate them using the commandline, or using the activated property.

activated

activated: string[]

list?

optional list?: NamedReporterContract[]


retries?

optional retries?: number

Defined in: src/runner/types.ts:231

The retries to apply on all the tests, unless overwritten explicitly


runnerPlugins?

optional runnerPlugins?: RunnerPluginFn[]

Defined in: src/runner/types.ts:266

Node-side runner plugins. Functions executed in the Node.js orchestrator. Receive the Node Runner, Emitter, and config.


setup?

optional setup?: SetupHookHandler[]

Defined in: src/runner/types.ts:288

Global hooks to execute before importing the test files


teardown?

optional teardown?: TeardownHookHandler[]

Defined in: src/runner/types.ts:293

Global hooks to execute on teardown


testPlugins?

optional testPlugins?: TestPluginEntry[]

Defined in: src/runner/types.ts:260

Browser-side test plugins. Module specifiers that export a default setup function conforming to WebPluginFn. Executed in the browser before test files load. Plugins receive the WebRunner, Emitter, and config.

Example

ts
testPlugins: ['@pawel-up/lupa/assert']
testPlugins: [['@pawel-up/lupa/assert', { openApi: false }]]

timeout?

optional timeout?: number

Defined in: src/runner/types.ts:226

The timeout to apply on all the tests, unless overwritten explicitly


vite?

optional vite?: InlineConfig

Defined in: src/runner/types.ts:314

Inline Vite configuration to merge with Lupa's defaults. Do not use together with 'viteConfig'.


viteConfig?

optional viteConfig?: string

Defined in: src/runner/types.ts:308

Path to the Vite configuration file. Do not use together with 'vite'.


watch?

optional watch?: boolean

Defined in: src/runner/types.ts:221

Whether to run tests in watch mode