diff --git a/gulpfile.js b/gulpfile.js index 646588d..f23dc57 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -85,6 +85,10 @@ gulp.task('browser-test', shell.task([ 'find test/ -type f -name "*.js" | xargs browserify -o ./browser/tests.js' ])); +gulp.task('karma', shell.task([ + './node_modules/karma/bin/karma start karma.conf.js' +])); + gulp.task('minify', function() { return gulp.src('dist/bitcore.js') .pipe(closureCompiler({ diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000..eb04f38 --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,9 @@ +// karma.conf.js +module.exports = function(config) { + config.set({ + frameworks: ['mocha'], + files: [ + 'browser/tests.js' + ] + }); +}; diff --git a/package.json b/package.json index 6254f19..cf1f1a5 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,8 @@ "lodash": "^2.4.1", "mocha": "~2.0.1", "run-sequence": "^1.0.2" + "karma": "^0.12.28", + "karma-mocha": "^0.1.9", }, "license": "MIT" }