initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
26
github/codeql-action-v1/node_modules/ava/lib/parse-test-args.js
generated
vendored
Normal file
26
github/codeql-action-v1/node_modules/ava/lib/parse-test-args.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
const buildTitle = (raw, implementation, args) => {
|
||||
let value = implementation && implementation.title ? implementation.title(raw, ...args) : raw;
|
||||
const isValid = typeof value === 'string';
|
||||
if (isValid) {
|
||||
value = value.trim().replace(/\s+/g, ' ');
|
||||
}
|
||||
|
||||
return {
|
||||
raw,
|
||||
value,
|
||||
isSet: value !== undefined,
|
||||
isValid,
|
||||
isEmpty: !isValid || value === '',
|
||||
};
|
||||
};
|
||||
|
||||
export default function parseTestArgs(args) {
|
||||
const rawTitle = typeof args[0] === 'string' ? args.shift() : undefined;
|
||||
const implementation = args.shift();
|
||||
|
||||
return {
|
||||
args,
|
||||
implementation: implementation && implementation.exec ? implementation.exec : implementation,
|
||||
title: buildTitle(rawTitle, implementation, args),
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue