Adding the basic test file for all components
Showing
... | @@ -3,9 +3,6 @@ | ... | @@ -3,9 +3,6 @@ |
"version": "0.1.0", | "version": "0.1.0", | ||
"private": true, | "private": true, | ||
"dependencies": { | "dependencies": { | ||
"@testing-library/jest-dom": "^4.2.4", | |||
"@testing-library/react": "^9.3.2", | |||
"@testing-library/user-event": "^7.1.2", | |||
"react": "^16.12.0", | "react": "^16.12.0", | ||
"react-dom": "^16.12.0", | "react-dom": "^16.12.0", | ||
"react-redux": "^7.1.3", | "react-redux": "^7.1.3", | ||
... | @@ -19,6 +16,7 @@ | ... | @@ -19,6 +16,7 @@ |
"start": "concurrently \"react-scripts start\" \"npm run mock-api\"", | "start": "concurrently \"react-scripts start\" \"npm run mock-api\"", | ||
"build": "react-scripts build", | "build": "react-scripts build", | ||
"test": "react-scripts test", | "test": "react-scripts test", | ||
"coverage": "CI=true react-scripts test --coverage", | |||
"eject": "react-scripts eject", | "eject": "react-scripts eject", | ||
"mock-api": "json-server server/data.json --port 3001" | "mock-api": "json-server server/data.json --port 3001" | ||
}, | }, | ||
... | @@ -38,9 +36,30 @@ | ... | @@ -38,9 +36,30 @@ |
] | ] | ||
}, | }, | ||
"proxy": "http://localhost:3001/", | "proxy": "http://localhost:3001/", | ||
"jest": { | |||
"collectCoverageFrom": [ | |||
"src/**/*.{js,jsx}", | |||
"!/node_modules/", | |||
"!src/serviceWorker.js", | |||
"!src/components/**/index.js" | |||
], | |||
"coverageThreshold": { | |||
"global": { | |||
"branches": 100, | |||
"functions": 100, | |||
"lines": 100, | |||
"statements": 100 | |||
} | |||
}, | |||
"coverageReporters": [ | |||
"text" | |||
] | |||
}, | |||
"devDependencies": { | "devDependencies": { | ||
"concurrently": "^5.1.0", | "concurrently": "^5.1.0", | ||
"enzyme": "^3.11.0", | |||
"enzyme-adapter-react-16": "^1.15.2", | |||
"json-server": "^0.15.1", | "json-server": "^0.15.1", | ||
"node-sass": "^4.13.1" | "node-sass": "^4.13.1" | ||
} | } | ||
} | } | ||
\ No newline at end of file |
src/pages/PDP/PDP.spec.js
0 → 100644
Please register or sign in to comment