mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 16:33:08 +02:00
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)
|
||||
);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"clean": "gulp clean",
|
||||
"cleanall": "gulp cleanall",
|
||||
"lint": "gulp lint",
|
||||
"test": "mocha --compilers ts:ts-node/register --harmony"
|
||||
"test": "gulp test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/bcryptjs": "2.4.0",
|
||||
|
@ -38,6 +38,7 @@
|
|||
"@types/gm": "1.17.29",
|
||||
"@types/gulp": "3.8.32",
|
||||
"@types/gulp-babel": "6.1.29",
|
||||
"@types/gulp-mocha": "0.0.29",
|
||||
"@types/gulp-rename": "0.0.31",
|
||||
"@types/gulp-tslint": "3.6.30",
|
||||
"@types/gulp-typescript": "0.0.32",
|
||||
|
@ -96,6 +97,7 @@
|
|||
"gulp-babel": "6.1.2",
|
||||
"gulp-cssnano": "2.1.2",
|
||||
"gulp-imagemin": "3.1.1",
|
||||
"gulp-mocha": "4.0.1",
|
||||
"gulp-pug": "3.2.0",
|
||||
"gulp-rename": "1.2.2",
|
||||
"gulp-tslint": "7.1.0",
|
||||
|
|
Loading…
Reference in a new issue