UNPKG

paradigm-core

Version:
38 lines (29 loc) 715 B
const execSync = require('child_process').execSync const gulp = require('gulp') const mocha = require('gulp-mocha') gulp.task('mocha', function(done) { gulp .src([ './src/**/test/unit/**/*js', './src/**/test/integration/**/*js', ], {read: false}) .pipe( mocha({ timeout: 5000, require: ['./test.js'], exit: true }).on('error', function () { process.exit(1) }) ) }) gulp.task('stop-reqlite', function(done) { try { execSync('node_modules/forever/bin/forever stop node_modules/reqlite/lib/node.js --port-offset 1 -s') } catch(e) { // pass } process.exit() }) gulp.task('test', ['mocha']) gulp.task('t', ['test'])