Translations: Français
All of the CLI options can be configured in the ava
section of either your package.json
file, or an ava.config.js
file. This allows you to modify the default behavior of the ava
command, so you don't have to repeatedly type the same options on the command prompt.
To ignore files, prefix the pattern with an !
(exclamation mark).
package.json
:
{
"ava": {
"files": [
"test/**/*",
"!test/exclude-files-in-this-directory",
"!**/exclude-files-with-this-name.*"
],
"helpers": [
"**/helpers/**/*"
],
"sources": [
"src/**/*"
],
"match": [
"*oo",
"!foo"
],
"cache": true,
"concurrency": 5,
"failFast": true,
"failWithoutAssertions": false,
"environmentVariables": {
"MY_ENVIRONMENT_VARIABLE": "