initial commit of actions

This commit is contained in:
Dominik Polakovics Polakovics 2026-01-31 18:56:04 +01:00
commit 949ece5785
44660 changed files with 12034344 additions and 0 deletions

View 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),
};
}