replace jest with ava

This commit is contained in:
Robert Brignull 2020-05-04 18:50:13 +01:00
parent 27cc8b23fe
commit 0347b72305
11775 changed files with 84546 additions and 1440575 deletions

21
node_modules/ava/lib/reporters/prefix-title.js generated vendored Normal file
View file

@ -0,0 +1,21 @@
'use strict';
const path = require('path');
const figures = require('figures');
const chalk = require('../chalk').get();
const SEPERATOR = ' ' + chalk.gray.dim(figures.pointerSmall) + ' ';
module.exports = (base, file, title) => {
const prefix = file
// Only replace base if it is found at the start of the path
.replace(base, (match, offset) => offset === 0 ? '' : match)
.replace(/\.spec/, '')
.replace(/\.test/, '')
.replace(/test-/g, '')
.replace(/\.js$/, '')
.split(path.sep)
.filter(p => p !== '__tests__')
.join(SEPERATOR);
return prefix + SEPERATOR + title;
};