diff --git a/__tests__/utils.test.js b/__tests__/utils.test.js new file mode 100644 index 000000000..35437f93b --- /dev/null +++ b/__tests__/utils.test.js @@ -0,0 +1,9 @@ +var assert = require('assert'); + +const utils = require("../source/utils.js") + +describe('capitalise0', function() { + it('should turn the first character into its capital', function() { + assert.equal("Salaire", utils.capitalise0("salaire")); + }); +}); diff --git a/package.json b/package.json index 6ef27934f..7a7967543 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,8 @@ "html-loader": "^0.4.5", "img-loader": "^2.0.0", "json-loader": "^0.5.4", + "mocha": "^3.4.2", + "mocha-webpack": "^0.7.0", "nearley-loader": "0.0.2", "postcss-loader": "^2.0.5", "react-hot-loader": "^3.0.0-beta.6", @@ -62,13 +64,14 @@ "redux-devtools-log-monitor": "^1.3.0", "style-loader": "^0.17.0", "url-loader": "^0.5.8", - "webpack": "^2.5.1", + "webpack": "^2.6.1", "webpack-dev-server": "^2.4.5", "yaml-loader": "^0.4.0" }, "scripts": { "start": "node source/server.js", "compile": "NODE_ENV='production' webpack --config source/webpack.config.js", - "surge": "npm run compile && surge --domain scientific-wish.surge.sh -p ./ && rm -rf dist/" + "surge": "npm run compile && surge --domain scientific-wish.surge.sh -p ./ && rm -rf dist/", + "test": "mocha-webpack --webpack-config webpack.config-test.js \"__tests__/**/*.test.js\"" } }