Skip to content

Commit 1fff08d

Browse files
committed
Remove checks against very old config options and related cleanup
1 parent 6f62c2d commit 1fff08d

File tree

3 files changed

+9
-25
lines changed

3 files changed

+9
-25
lines changed

lib/cli.js

+5-21
Original file line numberDiff line numberDiff line change
@@ -317,33 +317,17 @@ export default async function loadCli() { // eslint-disable-line complexity
317317
}
318318

319319
if (Object.hasOwn(combined, 'concurrency') && (!Number.isInteger(combined.concurrency) || combined.concurrency < 0)) {
320-
exit('The --concurrency or -c flag must be provided with a nonnegative integer.');
321-
}
322-
323-
if (!combined.tap && Object.keys(experiments).length > 0) {
324-
console.log(chalk.magenta(` ${figures.warning} Experiments are enabled. These are unsupported and may change or be removed at any time.`));
325-
}
326-
327-
if (Object.hasOwn(conf, 'babel')) {
328-
exit('Built-in Babel support has been removed.');
329-
}
330-
331-
if (Object.hasOwn(conf, 'compileEnhancements')) {
332-
exit('Enhancement compilation must be configured in AVA’s Babel options.');
333-
}
334-
335-
if (Object.hasOwn(conf, 'helpers')) {
336-
exit('AVA no longer compiles helpers. Add exclusion patterns to the ’files’ configuration and specify ’compileAsTests’ in the Babel options instead.');
337-
}
338-
339-
if (Object.hasOwn(conf, 'sources')) {
340-
exit('’sources’ has been removed. Use ’ignoredByWatcher’ to provide glob patterns of files that the watcher should ignore.');
320+
exit('The --concurrency or -c flag must be provided with a non-negative integer.');
341321
}
342322

343323
if (Object.hasOwn(conf, 'sortTestFiles') && typeof conf.sortTestFiles !== 'function') {
344324
exit('’sortTestFiles’ must be a comparator function.');
345325
}
346326

327+
if (!combined.tap && Object.keys(experiments).length > 0) {
328+
console.log(chalk.magenta(` ${figures.warning} Experiments are enabled. These are unsupported and may change or be removed at any time.`));
329+
}
330+
347331
let projectPackageObject;
348332
try {
349333
projectPackageObject = JSON.parse(fs.readFileSync(path.resolve(projectDir, 'package.json')));

test/concurrency/snapshots/test.js.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ Generated by [AVA](https://avajs.dev).
88

99
> fails with message
1010
11-
'The --concurrency or -c flag must be provided with a nonnegative integer.'
11+
'The --concurrency or -c flag must be provided with a non-negative integer.'
1212

1313
## bails when --concurrency is provided with an input that is a string
1414

1515
> fails with message
1616
17-
'The --concurrency or -c flag must be provided with a nonnegative integer.'
17+
'The --concurrency or -c flag must be provided with a non-negative integer.'
1818

1919
## bails when --concurrency is provided with an input that is a float
2020

2121
> fails with message
2222
23-
'The --concurrency or -c flag must be provided with a nonnegative integer.'
23+
'The --concurrency or -c flag must be provided with a non-negative integer.'
2424

2525
## bails when --concurrency is provided with an input that is negative
2626

2727
> fails with message
2828
29-
'The --concurrency or -c flag must be provided with a nonnegative integer.'
29+
'The --concurrency or -c flag must be provided with a non-negative integer.'
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)