Removing karma gulp tasks in favor or npm script

This commit is contained in:
Jeff Avallone 2016-10-15 12:36:49 -04:00
parent 2a496bf4c1
commit c89ef457b6
3 changed files with 6 additions and 18 deletions

View File

@ -4,6 +4,5 @@ node_js:
before_script: before_script:
- "export DISPLAY=:99.0" - "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start" - "sh -e /etc/init.d/xvfb start"
- npm install -g gulp
- sleep 3 - sleep 3
script: gulp verify script: npm test

View File

@ -13,7 +13,6 @@ const gulp = require('gulp-help')(require('gulp')),
buffer = require('vinyl-buffer'), buffer = require('vinyl-buffer'),
sourcemaps = require('gulp-sourcemaps'), sourcemaps = require('gulp-sourcemaps'),
babelify = require('babelify'), babelify = require('babelify'),
karma = require('karma'),
path = require('path'), path = require('path'),
jscs = require('gulp-jscs'), jscs = require('gulp-jscs'),
config = require('./config'); config = require('./config');
@ -109,22 +108,9 @@ gulp.task('styles', 'Build stylesheets into ./build directory.', function() {
.pipe(gulp.dest(config.buildPath('css'))) .pipe(gulp.dest(config.buildPath('css')))
}); });
gulp.task('verify', 'Verify (lint and run tests) scripts.', ['karma:single', 'lint']); gulp.task('verify', 'Verify (lint and run tests) scripts.', ['lint']);
gulp.task('verify:watch', 'Auto-verify scripts.', ['karma', 'lint:watch']); gulp.task('verify:watch', 'Auto-verify scripts.', ['lint:watch']);
gulp.task('karma', 'Auto-run scripting tests.', function(done) {
new karma.Server({
configFile: path.join(__dirname, 'karma.conf.js')
}, done).start();
});
gulp.task('karma:single', 'Run scripting tests', function(done) {
new karma.Server({
configFile: path.join(__dirname, 'karma.conf.js'),
singleRun: true
}, done).start();
});
gulp.task('lint', 'Lint scripts', function() { gulp.task('lint', 'Lint scripts', function() {
return gulp.src(config.globs.lint) return gulp.src(config.globs.lint)

View File

@ -9,6 +9,9 @@
}, },
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"scripts": {
"test": "karma start --single-run"
},
"devDependencies": { "devDependencies": {
"babel-core": "^6.17.0", "babel-core": "^6.17.0",
"babel-loader": "^6.2.5", "babel-loader": "^6.2.5",