-
Notifications
You must be signed in to change notification settings - Fork 1
/
.madrun.js
30 lines (24 loc) · 1 KB
/
.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
27
28
29
30
import {run} from 'madrun';
const NODE_OPTIONS = `'--loader ./lib/estrace.js'`;
const traceEnv = {
NODE_OPTIONS,
};
const UPDATE_FIXTURE = {
UPDATE: 1,
};
export default {
'test': () => `tape 'test/**/*.js' 'lib/**/*.spec.js'`,
'test:fix': async () => [UPDATE_FIXTURE, await run('test')],
'trace:test': () => [traceEnv, `tape 'test/**/*.js' 'lib/**/*.spec.js'`],
'coverage': async () => `c8 ${await run('test')}`,
'lint': () => 'putout . --raw',
'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 () => await run('watcher', `"${await run('test')}"`),
'watch:lint': async () => await run('watcher', `'npm run lint'`),
'watch:tape': () => 'nodemon -w test -w lib --exec tape',
'watch:coverage': async () => await run('watcher', await run('coverage')),
};