diff --git a/gulpfile.ts b/gulpfile.ts
index 08fdc7ec06..dfbc265357 100644
--- a/gulpfile.ts
+++ b/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)
 );
diff --git a/package.json b/package.json
index 93cf2066d1..276436b725 100644
--- a/package.json
+++ b/package.json
@@ -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",