diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index cecae587a2e22e11052da3dc01371310086a74bd..37ab19c3a1ef729a8abaf0b154301e316480736f 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -36,7 +36,7 @@ function compile() {
 
 gulp.task('build', compile);
 
-gulp.task('test', () => {
+gulp.task('test', ['build'], () => {
   gulp.src('test/test.js', {read: false})
     .pipe(mocha())
     .once('error', () => {