diff --git a/package.json b/package.json index d18ada7..a6be06e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "scripts": { "build": "npm run build", "buildjs": "rm -f dist/*.js && browserify --transform babelify --transform browserify-handlebars app/index.js --debug | exorcist dist/comicbook.js.map > dist/comicbook.js", - "test": "standard" + "pretest": "standard", + "test": "mocha-phantomjs test/index.html" }, "repository": { "type": "git", @@ -25,21 +26,28 @@ } ], "standard": { - "parser": "babel-eslint", "ignore": [ - "dist", - "assets" - ] + "assets", + "dist" + ], + "global": [ + "describe", + "it" + ], + "parser": "babel-eslint" }, "devDependencies": { "babel-eslint": "^3.1.23", "babelify": "^6.1.3", "browserify": "^10.2.6", "browserify-handlebars": "^1.0.0", + "chai": "^3.0.0", "cssmin": "^0.4.3", "exorcist": "^0.4.0", "handlebars": "^3.0.3", "mocha": "^2.2.5", + "mocha-phantomjs": "^3.5.3", + "phantomjs": "^1.9.17", "standard": "^4.5.3", "uglify-js": "^2.4.23" } diff --git a/test/index.html b/test/index.html new file mode 100644 index 0000000..6d5f46f --- /dev/null +++ b/test/index.html @@ -0,0 +1,22 @@ + +
+ + + + + + + + + + + + + diff --git a/test/lib/load-indicator.js b/test/lib/load-indicator.js new file mode 100644 index 0000000..65a4322 --- /dev/null +++ b/test/lib/load-indicator.js @@ -0,0 +1,10 @@ +'use strict' + +describe('#loadIndicator()', function () { + + it('should render') + + it('should emit a "show" event') + + it('should emit a "hide" event') +})