Use gulp-mocha
This commit is contained in:
parent
55f8d88df9
commit
659e350bc6
2 changed files with 12 additions and 2 deletions
10
gulpfile.ts
10
gulpfile.ts
|
@ -19,6 +19,7 @@ import * as rimraf from 'rimraf';
|
|||
import * as chalk from 'chalk';
|
||||
import imagemin = require('gulp-imagemin');
|
||||
import * as rename from 'gulp-rename';
|
||||
import * as mocha from 'gulp-mocha';
|
||||
|
||||
const env = process.env.NODE_ENV;
|
||||
const isProduction = env === 'production';
|
||||
|
@ -95,7 +96,7 @@ gulp.task('build:copy', () =>
|
|||
)
|
||||
);
|
||||
|
||||
gulp.task('test', ['lint', 'build']);
|
||||
gulp.task('test', ['lint', 'mocha']);
|
||||
|
||||
gulp.task('lint', () =>
|
||||
gulp.src('./src/**/*.ts')
|
||||
|
@ -105,6 +106,13 @@ gulp.task('lint', () =>
|
|||
.pipe(tslint.report())
|
||||
);
|
||||
|
||||
gulp.task('mocha', () =>
|
||||
gulp.src([])
|
||||
.pipe(mocha({
|
||||
compilers: 'ts:ts-node/register'
|
||||
} as any))
|
||||
);
|
||||
|
||||
gulp.task('clean', cb =>
|
||||
rimraf('./built', cb)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue