Skip to content

Commit 7064c59

Browse files
committed
improve(build): fixed running Karma unit testing before final optimization
1 parent 31f868d commit 7064c59

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

gulpfile.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,13 @@ gulp.task('html', ['optimize'], function () {
226226
// Perform final optimization
227227
// ==========================
228228

229-
gulp.task('optimize', ['html:inject'], function () {
229+
var optimizeTasks = ['html:inject', 'test:run'];
230+
231+
if (args.notest) {
232+
optimizeTasks.splice(optimizeTasks.indexOf('test:run'), 1);
233+
}
234+
235+
gulp.task('optimize', optimizeTasks, function () {
230236
var assets = plugins.useref.assets();
231237
var cssFilter = plugins.filter('**/*.css', { restore: true });
232238
var jsFilter = plugins.filter('**/*.js', { restore: true });

0 commit comments

Comments
 (0)