diff --git a/gulpfile.js b/gulpfile.js index 989387e2..9ad9c893 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,10 +12,8 @@ var clean = require('gulp-clean') var protractor = require("gulp-protractor") var protractorConfig = require('./res/test/protractor.conf.js') var karma = require('karma').server -var karmaConfig = require('./res/test/karma.conf.js') +var karmaConfig = '/res/test/karma.conf.js' var stream = require('stream') -var _ = require('lodash') - gulp.task('jshint', function () { return gulp.src([ @@ -45,12 +43,17 @@ gulp.task('lint', ['jshint', 'jsonlint']) gulp.task('test', ['lint', 'protractor']) gulp.task('build', ['translate', 'webpack:build']) -gulp.task('karma', function (done) { - karma.start(_.assign({}, karmaConfig, {singleRun: true}), done) +gulp.task('karma_ci', function (done) { + karma.start({ + configFile: __dirname + karmaConfig, + singleRun: true + }, done) }) -gulp.task('karma_watch', function (done) { - karma.start(karmaConfig, done) +gulp.task('karma', function (done) { + karma.start({ + configFile: __dirname + karmaConfig + }, done) }) gulp.task('webdriver_update', protractor.webdriver_update) diff --git a/res/app/hello-test.js b/res/app/hello-test.js index 0c7c43a6..51c3bd5d 100644 --- a/res/app/hello-test.js +++ b/res/app/hello-test.js @@ -1,10 +1,11 @@ describe('greeter', function () { function greet(str) { - return 'Helloaw, ' + str + return 'Hello, ' + str } it('should say Hello to the World', function () { - expect(greet('World')).toEqual('Hello, World!') + expect(greet('World!')).toEqual('Hello, World!') }) + }) diff --git a/res/test/karma.conf.js b/res/test/karma.conf.js index 464de068..9180262a 100644 --- a/res/test/karma.conf.js +++ b/res/test/karma.conf.js @@ -1,21 +1,16 @@ -// Karma configuration - module.exports = function (config) { config.set({ - - // base path, that will be used to resolve files and exclude - //basePath: '', - - frameworks: ['jasmine'], files: [ //'test/*Test.*' '../app/*-test.js' +// '../app/**/*.js' ], exclude: [ ], preprocessors: { +// '../app/**/*.js': ['webpack'] '../app/*-test.js': ['webpack'] },