Skip to content

Commit

Permalink
chore: add jest for javascript testing
Browse files Browse the repository at this point in the history
  • Loading branch information
cbarber committed Aug 1, 2018
1 parent e78f5b5 commit 6ce3c42
Show file tree
Hide file tree
Showing 4 changed files with 1,041 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[
"env",
{
"modules": false,
"modules": "commonjs",
"targets": {
"browsers": "> 1%",
"uglify": true
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
},
"env": {
"browser": true,
"jest": true,
},
"settings": {
"import/resolver": {
Expand Down
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
},
"devDependencies": {
"babel-eslint": "^8.2.3",
"babel-jest": "^23.4.0",
"babel-preset-env": "^1.7.0",
"eslint": "^4.9.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
Expand All @@ -32,12 +34,25 @@
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.9.1",
"jest": "^23.4.1",
"prettier": "^1.13.4",
"react-svg-loader": "^2.1.0",
"require-yaml": "^0.0.1",
"webpack-dev-server": "2.11.2"
},
"scripts": {
"lint": "./node_modules/.bin/eslint --ext js --ext jsx app/javascript/"
"lint": "./node_modules/.bin/eslint --ext js --ext jsx app/javascript/",
"test": "jest"
},
"jest": {
"verbose": true,
"testURL": "http://localhost/",
"roots": [
"app/javascript"
],
"moduleDirectories": [
"node_modules",
"app/javascript"
]
}
}
Loading

0 comments on commit 6ce3c42

Please sign in to comment.