forked from pepyatka/pepyatka-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJakefile
19 lines (16 loc) · 773 Bytes
/
Jakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var exec = require('child_process').exec;
task('default', ['test'])
desc('Runs all of the test files in the test directories.')
task('test', function (params, b) {
var proc = exec('NODE_ENV=test ./node_modules/mocha/bin/mocha')
proc.on('exit', process.exit)
proc.stdout.pipe(process.stdout, { end: false })
proc.stderr.pipe(process.stderr, { end: false })
}, {async: true})
desc('Calculates test coverage of the test files in the test directories.')
task('coverage', function (params, b) {
var proc = exec('NODE_ENV=test ./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec');
proc.on('exit', process.exit)
proc.stdout.pipe(process.stdout, { end: false })
proc.stderr.pipe(process.stderr, { end: false })
}, {async: true})