initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
19
github/codeql-action-v2/node_modules/ava/lib/worker/guard-environment.cjs
generated
vendored
Normal file
19
github/codeql-action-v2/node_modules/ava/lib/worker/guard-environment.cjs
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
const path = require('node:path');
|
||||
const process = require('node:process');
|
||||
|
||||
const {isRunningInThread, isRunningInChildProcess} = require('./utils.cjs');
|
||||
|
||||
// Check if the test is being run without AVA cli
|
||||
if (!isRunningInChildProcess && !isRunningInThread) {
|
||||
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 $ 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');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue