working javascript tests

adds some arguments to unit tests to get around some windows shenanigans
and adds enzyme to the project for use in testing
This commit is contained in:
erik-sn committed 2020-10-05 18:40:13 -04:00
1 parent 7e2fb07d67
commit 46e836a913
4 files changed
+368 -27

No files matched your search

+7 -2
View File
@@ -10,8 +10,11 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"@types/jest": "^26.0.14",
"core-js": "^3.6.5",
"emoji-mart": "^3.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"husky": "^4.2.5",
"i18next": "^19.7.0",
"prettier": "^2.0.5",
@@ -43,6 +46,7 @@
"html-loader": "^0.5.5",
"html-webpack-plugin": "^4.3.0",
"ifdef-loader": "^2.1.5",
"react-test-renderer": "^16.13.1",
"style-loader": "^0.23.1",
"svg-url-loader": "^2.3.2",
"terser-webpack-plugin": "^1.3.0",
@@ -54,7 +58,8 @@
"watch": "cra-build-watch --disable-chunks --build-path ../resources/html --output-filename dev.js",
"build": "react-scripts build",
"build:resources": "cross-env NODE_ENV=production webpack --config webpack/webpack.resources.js --color -p --progress --hide-modules --display-optimization-bailout",
"test": "react-scripts test",
"test": "react-scripts test --watchAll=false --testMatch **/src/**/*.test.js",
"test:watch": "react-scripts test --watchAll --testMatch **/src/**/*.test.js",
"eject": "react-scripts eject"
},
"eslintConfig": {
@@ -79,7 +84,7 @@
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged && npm run test"
}
}
}