From 2a0c02295ac6b3a21047e08a0174361003f02736 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Fri, 3 Feb 2017 14:12:46 -0200 Subject: [#922] Move new js tests to mocha We decided to move to mocha because it has more support for node testing with webpack (no need for browser). Since we're moving to React, we don't need the browser for our unit tests. With @tayanefernandes --- web-ui/package.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'web-ui/package.json') diff --git a/web-ui/package.json b/web-ui/package.json index ec880270..6f875280 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -16,6 +16,7 @@ "css-loader": "^0.26.1", "dompurify": "^0.8.4", "enzyme": "^2.7.1", + "expect": "^1.20.2", "font-awesome": "^4.7.0", "handlebars": "^4.0.5", "he": "^1.1.0", @@ -25,13 +26,13 @@ "i18next-xhr-backend": "^1.2.1", "iframe-resizer": "^3.5.7", "imagemin": "5.2.1", - "jasmine": "^2.5.3", "jasmine-flight": "^4.0.0", "jasmine-jquery": "^2.1.1", "jquery": "^3.1.1", "jquery-file-upload": "^4.0.5", "jquery-ui": "^1.12.1", "jshint": "2.9.2", + "json-loader": "^0.5.4", "karma": "0.13.19", "karma-chrome-launcher": "0.2.2", "karma-coverage": "0.2.7", @@ -42,6 +43,8 @@ "karma-phantomjs-launcher": "1.0.1", "karma-requirejs": "1.0.0", "minify": "^2.0.13", + "mocha": "^3.2.0", + "mocha-webpack": "^0.7.0", "modernizr": "^3.3.1", "node-sass": "^4.5.0", "quoted-printable": "^1.0.1", @@ -57,8 +60,8 @@ "webpack": "^1.14.0" }, "scripts": { - "test": "npm run jshint --silent && npm run build-statics --silent && npm run jasmine-test && npm run karma-test", - "jasmine-test": "babel-node ./node_modules/.bin/jasmine JASMINE_CONFIG_PATH=test/jasmine.json", + "test": "npm run jshint --silent && npm run build-statics --silent && npm run mocha-test && npm run karma-test", + "mocha-test": "mocha-webpack --webpack-config webpack.test.config.js \"test/spec/account_recovery/**/*.spec.js\"", "karma-test": "karma start --single-run $GRUNT_OPTS", "debug": "npm run build && karma start --browsers Chrome $GRUNT_OPTS", "watch": "npm run compass-watch & npm run handlebars-watch & npm run build-js-watch", -- cgit v1.2.3