Ajouter des tests unitaires

pull/14/head
Laurent Bossavit 2017-06-26 14:11:25 +02:00
parent 2a76940bd7
commit d3a38af3cf
2 changed files with 14 additions and 2 deletions

9
__tests__/utils.test.js Normal file
View File

@ -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"));
});
});

View File

@ -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\""
}
}