diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000..20ea2f9 --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,11 @@ +module.exports = function(config) { + config.set({ + browsers : ['PhantomJS'], + frameworks: ['jasmine'], + files: [ + 'js/*.js', + 'spec/*.js' + ], + singleRun: true + }); +}; diff --git a/package.json b/package.json index 9df506b..a67d656 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,12 @@ "canvas": "~1.0" }, "devDependencies": { + "jasmine-core": "~2.1.2", "jasmine-node": "~2.0.0", - "smoosh": ">=0.3.1", - "jasmine-core": "~2.0.0" + "karma": "~0.12.25", + "karma-jasmine": "~0.3.0", + "karma-phantomjs-launcher": "~0.1.4", + "smoosh": ">=0.3.1" }, "repository": { "type": "git", @@ -33,9 +36,9 @@ "node": ">= 0.6.0" }, "bin": { - "imagediff" : "./bin/imagediff" + "imagediff": "./bin/imagediff" }, "scripts": { - "test": "cd spec && jasmine-node --captureExceptions ." + "test": "cd spec && jasmine-node --captureExceptions . && cd .. && karma start karma.conf.js" } }