chore: use jest for testing instead of react-scripts

This commit is contained in:
Saleel
2023-05-27 13:54:00 +05:30
parent 18c5d10391
commit 37dcd223be
5 changed files with 3781 additions and 80 deletions

View File

@@ -63,12 +63,11 @@
"serve": "vite preview",
"both-build": "react-scripts build && next build",
"next-build": "next build",
"test": "react-scripts test --runInBand --testPathIgnorePatterns='e2e|src/contracts/lib' --reporters=default --reporters=jest-junit",
"test": "jest --runInBand --testPathIgnorePatterns='e2e|src/contracts/lib' --reporters=default --reporters=jest-junit",
"test:browserstack": "browserstack-node-sdk jest src/ --runInBand --testPathIgnorePatterns='e2e|src/contracts/lib' --reporters=default --reporters=jest-junit",
"start-e2e-test-server": "serve -s build -p 3000",
"test:e2e-ui": "CI=true react-scripts test --runInBand --testPathPattern='e2e-ui' --reporters=default --reporters=jest-junit",
"test:e2e-zkp": "CI=true react-scripts test --runInBand --testPathPattern='e2e-dl-zkp' --reporters=default --reporters=jest-junit",
"eject": "react-scripts eject",
"test:e2e-ui": "CI=true jest test --runInBand --testPathPattern='e2e-ui' --reporters=default --reporters=jest-junit",
"test:e2e-zkp": "CI=true jest test --runInBand --testPathPattern='e2e-dl-zkp' --reporters=default --reporters=jest-junit",
"compile": "node circuits/scripts/compile.js",
"gen-input": "npx tsx src/scripts/generate_input.ts",
"compile-all": "yarn gen-input && yarn compile email true",
@@ -95,6 +94,9 @@
]
},
"devDependencies": {
"@babel/preset-env": "^7.22.2",
"@babel/preset-react": "^7.22.0",
"@babel/preset-typescript": "^7.21.5",
"@types/atob": "^2.1.2",
"@types/jest": "^29.4.0",
"@types/node": "^18.0.6",
@@ -102,6 +104,8 @@
"browserstack-local": "^1.5.1",
"browserstack-node-sdk": "^1.6.1",
"husky": "^8.0.3",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-junit": "^15.0.0",
"madge": "^6.0.0",
"msw": "^1.0.1",
@@ -110,13 +114,13 @@
"selenium-webdriver": "^4.8.1",
"ts-node-dev": "^2.0.0",
"vite-plugin-commonjs": "^0.7.0",
"vite-plugin-ngmi-polyfill": "^0.0.2",
"vite-preset-react": "^2.3.0"
"vite-plugin-ngmi-polyfill": "^0.0.2"
},
"jest": {
"transformIgnorePatterns": [
"node_modules/(?!@rainbow-me/rainbowkit)"
]
],
"testEnvironment": "jsdom"
},
"packageManager": "yarn@3.2.3"
}