Skip to content

Commit

Permalink
Remove --no-cache CLI flag
Browse files Browse the repository at this point in the history
This is a weird flag to use when invoking AVA, since it causes AVA to
use a temporary directory as the cache. Removing the flag will cause AVA
to revert to the regular cache directory.

Document the `cache` configuration option (non-CLI).
  • Loading branch information
novemberborn committed May 20, 2018
1 parent 0d6986c commit 8c9c474
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 1 addition & 6 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ exports.run = () => { // eslint-disable-line complexity
--concurrency, -c Max number of test files running at the same time (Default: CPU cores)
--verbose, -v Enable verbose output
--tap, -t Generate TAP output
--no-cache Disable the compiler cache
--color Force color output
--no-color Disable color output
Expand Down Expand Up @@ -92,10 +91,6 @@ exports.run = () => { // eslint-disable-line complexity
alias: 't',
default: conf.tap
},
cache: {
type: 'boolean',
default: conf.cache !== false
},
color: {
type: 'boolean',
default: 'color' in conf ? conf.color : require('supports-color').stdout !== false
Expand Down Expand Up @@ -151,7 +146,7 @@ exports.run = () => { // eslint-disable-line complexity
failWithoutAssertions: conf.failWithoutAssertions !== false,
serial: conf.serial,
require: arrify(conf.require),
cacheEnabled: conf.cache,
cacheEnabled: conf.cache !== false,
compileEnhancements: conf.compileEnhancements !== false,
match,
babelConfig,
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ $ ava --help
--concurrency, -c Max number of test files running at the same time (Default: CPU cores)
--verbose, -v Enable verbose output
--tap, -t Generate TAP output
--no-cache Disable the compiler cache
--color Force color output
--no-color Disable color output

Expand Down Expand Up @@ -253,6 +252,7 @@ To ignore a file or directory, prefix the pattern with an `!` (exclamation mark)
"*oo",
"!foo"
],
"cache": true,
"concurrency": 5,
"failFast": true,
"failWithoutAssertions": false,
Expand All @@ -277,6 +277,7 @@ Arguments passed to the CLI will always take precedence over the configuration i
- `files`: file & directory paths and glob patterns that select which files AVA will run tests from. Only files with a `.js` extension are used. Files with an underscore prefix are ignored. All `.js` files in selected directories are run
- `source`: files that, when changed, cause tests to be re-run in watch mode. See the [watch mode recipe for details](https://github.com/avajs/ava/blob/master/docs/recipes/watch-mode.md#source-files-and-test-files)
- `match`: not typically useful in the `package.json` configuration, but equivalent to [specifying `--match` on the CLI](#running-tests-with-matching-titles)
- `cache`: cache compiled test and helper files under `node_modules/.cache/ava`. If `false`, files are cached in a temporary directory instead
- `failFast`: stop running further tests once a test fails
- `failWithoutAssertions`: if `false`, does not fail a test if it doesn't run [assertions](#assertions)
- `tap`: if `true`, enables the [TAP reporter](#tap-reporter)
Expand Down

0 comments on commit 8c9c474

Please sign in to comment.