initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
23
github/codeql-action-v1/node_modules/ava/lib/reporters/prefix-title.js
generated
vendored
Normal file
23
github/codeql-action-v1/node_modules/ava/lib/reporters/prefix-title.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import path from 'node:path';
|
||||
|
||||
import figures from 'figures';
|
||||
|
||||
import {chalk} from '../chalk.js';
|
||||
|
||||
const SEPARATOR = ' ' + chalk.gray.dim(figures.pointerSmall) + ' ';
|
||||
|
||||
export default function prefixTitle(extensions, base, file, title) {
|
||||
const parts = file
|
||||
// Only replace base if it is found at the start of the path
|
||||
.replace(base, (match, offset) => offset === 0 ? '' : match)
|
||||
.split(path.sep)
|
||||
.filter(p => p !== '__tests__');
|
||||
|
||||
const filename = parts.pop()
|
||||
.replace(/\.spec\./, '.')
|
||||
.replace(/\.test\./, '.')
|
||||
.replace(/test-/, '')
|
||||
.replace(new RegExp(`.(${extensions.join('|')})$`), '');
|
||||
|
||||
return [...parts, filename, title].join(SEPARATOR);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue