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:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- npm install -g gulp
- 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'),
sourcemaps = require('gulp-sourcemaps'),
babelify = require('babelify'),
karma = require('karma'),
path = require('path'),
jscs = require('gulp-jscs'),
config = require('./config');
@ -109,22 +108,9 @@ gulp.task('styles', 'Build stylesheets into ./build directory.', function() {
.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('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('verify:watch', 'Auto-verify scripts.', ['lint:watch']);
gulp.task('lint', 'Lint scripts', function() {
return gulp.src(config.globs.lint)

View File

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