Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 8babda6

Browse files
committed
parse mocha test files from karma config
1 parent b138ee1 commit 8babda6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tasks/test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ const gulp = require('gulp')
44
const Server = require('karma').Server
55
const $ = require('gulp-load-plugins')()
66
const runSequence = require('run-sequence')
7+
const parseKarmaConfig = require('karma/lib/config').parseConfig
8+
const karmaConfig = parseKarmaConfig(__dirname + '/../karma.conf.js', {})
79

810
require('./daemons')
911

@@ -34,7 +36,9 @@ gulp.task('test:browser', done => {
3436
})
3537

3638
gulp.task('mocha', () => {
37-
return gulp.src('test/tests.js')
39+
return gulp.src(karmaConfig.files.map(function (fileObj) {
40+
return fileObj.pattern
41+
}))
3842
.pipe($.mocha())
3943
})
4044

0 commit comments

Comments
 (0)