Discover modules > cue.dev/x/npmjs/ava
v0.4.0
#Schema: ¶

AVA Config Schema

Configuration Schema for the JavaScript test runner AVA

"files"?: #."array-of-paths" ¶
"ignoredByWatcher"?: #."array-of-paths" ¶
"match"?: #."array-of-paths" ¶
"cache"?: bool ¶

Defaults to `true` to cache compiled files under `node_modules/.cache/ava.` If `false`, files are cached in a temporary directory instead

"concurrency"?: number ¶

Max number of test files running at the same time (default: CPU cores)

"workerThreads"?: bool ¶

Use worker threads to run tests (enabled by default). If `false`, tests will run in child processes

"failFast"?: bool ¶

Stop running further tests once a test fails

"failWithoutAssertions"?: bool ¶

If `false`, does not fail a test if it doesn't run assertions

"environmentVariables"?: ¶

environment variables

Specifies environment variables to be made available to the tests. The environment variables defined here override the ones from `process.env`

[string]: string ¶
"serial"?: bool ¶

if `true`, prevents parallel execution of tests within a file

"tap"?: bool ¶

If `true`, enables the TAP reporter

"verbose"?: bool ¶

If `true`, enables verbose output (though currently non-verbose output is not supported)

"snapshotDir"?: #path ¶
"extensions"?: matchN(>=1, [#."array-of-strings", {{[=~"^(c|m)?js$"]: true}, {[!~"^(c|m)?js$" & !~"^()$"]: "commonjs" | "module"}}]) ¶

Extensions of test files. Setting this overrides the default `["cjs", "mjs", "js"]` value, so make sure to include those extensions in the list. Experimentally you can configure how files are loaded

"require"?: #."array-of-paths" ¶
"timeout"?: matchN(>=1, [>=0, =~"^(\\d+)(s|m)$"]) ¶

Timeouts in AVA behave differently than in other test frameworks. AVA resets a timer after each test, forcing tests to quit if no new test results were received within the specified timeout. This can be used to handle stalled tests. See our timeout documentation for more options

"nodeArguments"?: #."array-of-strings" ¶
"utilizeParallelBuilds"?: bool ¶

If `false`, disable parallel builds (default: `true`)

"typescript"?: ¶

configuration

Configures @ava/typescript for projects that precompile TypeScript. Alternatively, you can use `ts-node` to do live testing without transpiling, in which case you shouldn't use the `typescript` property

"extensions"?: #."array-of-paths" ¶
"rewritePaths"?: ¶

paths

AVA searches your entire project for `*.js`, `*.cjs`, `*.mjs` and `*.ts` files (or other extensions you've configured). It will ignore such files found in the `rewritePaths` targets (e.g. `build/`). If you use more specific paths, for instance `build/main/`, you may need to change AVA's `files` configuration to ignore other directories. Paths are relative to your project directory

[=~"/$"]: =~"/$"
"compile"?: false | "tsc" ¶

If `false`, AVA will assume you have already compiled your project. If set to `'tsc'`, AVA will run the TypeScript compiler before running your tests. This can be inefficient when using AVA in watch mode

#:
"array-of-paths": [...#path]
[...]: #path
"array-of-strings": [...string]
[...]: string
#path: strings.MinRunes(1) ¶

Source files

  • schema.cue