replace jest with ava
This commit is contained in:
parent
27cc8b23fe
commit
0347b72305
11775 changed files with 84546 additions and 1440575 deletions
15
node_modules/ava/lib/parse-test-args.js
generated
vendored
Normal file
15
node_modules/ava/lib/parse-test-args.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
'use strict';
|
||||
function parseTestArgs(args) {
|
||||
const rawTitle = typeof args[0] === 'string' ? args.shift() : undefined;
|
||||
const receivedImplementationArray = Array.isArray(args[0]);
|
||||
const implementations = receivedImplementationArray ? args.shift() : args.splice(0, 1);
|
||||
|
||||
const buildTitle = implementation => {
|
||||
const title = implementation.title ? implementation.title(rawTitle, ...args) : rawTitle;
|
||||
return {title, isSet: typeof title !== 'undefined', isValid: typeof title === 'string', isEmpty: !title};
|
||||
};
|
||||
|
||||
return {args, buildTitle, implementations, rawTitle, receivedImplementationArray};
|
||||
}
|
||||
|
||||
module.exports = parseTestArgs;
|
||||
Loading…
Add table
Add a link
Reference in a new issue