-
Notifications
You must be signed in to change notification settings - Fork 0
/
.madrun.js
26 lines (23 loc) · 952 Bytes
/
.madrun.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import {SKIPED} from 'supertape/exit-codes';
import {run, cutEnv} from 'madrun';
const env = {
SUPERTAPE_CHECK_SKIPED: 1,
ESCOVER_SUCCESS_EXIT_CODE: SKIPED,
};
const coverageEnv = {
ESCOVER_FORMAT: 'lines',
};
export default {
'test': () => [env, `bin/escover.js tape 'test/**/*.js' 'lib/**/*.spec.js' 'example/*.spec.js'`],
'coverage': async () => [coverageEnv, `c8 ${await cutEnv('test')}`],
'lint': () => 'putout .',
'fresh:lint': () => run('lint', '--fresh'),
'lint:fresh': () => run('lint', '--fresh'),
'fix:lint': () => run('lint', '--fix'),
'report': () => 'c8 report --reporter=lcov',
'watcher': () => 'nodemon -w test -w lib --exec',
'watch:test': async () => [env, await run('watcher', await cutEnv('test'))],
'watch:lint': async () => await run('watcher', `'npm run lint'`),
'watch:tape': () => 'nodemon -w test -w lib --exec tape',
'prewisdom': () => run(['lint', 'test']),
};