replace jest with ava

This commit is contained in:
Robert Brignull 2020-05-04 18:50:13 +01:00
parent 27cc8b23fe
commit 0347b72305
11775 changed files with 84546 additions and 1440575 deletions

18
node_modules/ava/lib/worker/ensure-forked.js generated vendored Normal file
View file

@ -0,0 +1,18 @@
'use strict';
const path = require('path');
const chalk = require('chalk'); // Use default Chalk instance.
// Check if the test is being run without AVA cli
const isForked = typeof process.send === 'function';
if (!isForked) {
if (process.argv[1]) {
const fp = path.relative('.', process.argv[1]);
console.log();
console.error(`Test files must be run with the AVA CLI:\n\n ${chalk.grey.dim('$')} ${chalk.cyan('ava ' + fp)}\n`);
process.exit(1); // eslint-disable-line unicorn/no-process-exit
} else {
throw new Error('The ava module can only be imported in test files');
}
}