mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ui.git
				synced 2025-10-30 02:12:39 +00:00 
			
		
		
		
	setup jest
This commit is contained in:
		| @@ -1,31 +1,7 @@ | ||||
| module.exports = { | ||||
|   collectCoverageFrom: [ | ||||
|     'app/**/*.{js,jsx}', | ||||
|     '!app/**/*.test.{js,jsx}', | ||||
|     '!app/*/RbGenerated*/*.{js,jsx}', | ||||
|     '!app/app.js', | ||||
|     '!app/global-styles.js', | ||||
|     '!app/*/*/Loadable.{js,jsx}', | ||||
|   ], | ||||
|   coverageThreshold: { | ||||
|     global: { | ||||
|       statements: 98, | ||||
|       branches: 91, | ||||
|       functions: 98, | ||||
|       lines: 98, | ||||
|     }, | ||||
|   }, | ||||
|   moduleDirectories: ['node_modules', 'app'], | ||||
|   moduleNameMapper: { | ||||
|     '.*\\.(css|less|styl|scss|sass)$': '<rootDir>/internals/mocks/cssModule.js', | ||||
|     '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': | ||||
|       '<rootDir>/internals/mocks/image.js', | ||||
|   }, | ||||
|   setupFilesAfterEnv: [ | ||||
|     '<rootDir>/internals/testing/test-bundler.js', | ||||
|     'react-testing-library/cleanup-after-each', | ||||
|   ], | ||||
|   setupFiles: ['raf/polyfill'], | ||||
|   testRegex: 'tests/.*\\.test\\.js$', | ||||
|   snapshotSerializers: [], | ||||
|   moduleNameMapper: { | ||||
|     '^.+\\.(css|less|scss)$': 'babel-jest', | ||||
|   }, | ||||
| }; | ||||
|   | ||||
							
								
								
									
										3742
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										3742
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -8,7 +8,7 @@ | ||||
|     "node": ">=8" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "test": "echo \"Error: no test specified\" && exit 0", | ||||
|     "test": "jest --passWithNoTests --coverage", | ||||
|     "start": "cross-env NODE_ENV=development webpack-dev-server", | ||||
|     "build": "webpack --mode=production", | ||||
|     "format": "prettier --write \"app/**/*.js\"", | ||||
| @@ -40,8 +40,10 @@ | ||||
|     "@babel/plugin-proposal-class-properties": "^7.8.3", | ||||
|     "@babel/preset-env": "^7.8.7", | ||||
|     "@babel/preset-react": "^7.8.3", | ||||
|     "@testing-library/react": "^10.0.3", | ||||
|     "babel-core": "^6.26.3", | ||||
|     "babel-eslint": "^10.1.0", | ||||
|     "babel-jest": "^25.4.0", | ||||
|     "babel-loader": "^8.0.6", | ||||
|     "babel-plugin-root-import": "^6.4.1", | ||||
|     "babel-polyfill": "^6.26.0", | ||||
| @@ -59,12 +61,14 @@ | ||||
|     "eslint-plugin-react-hooks": "^2.5.0", | ||||
|     "file-loader": "^5.1.0", | ||||
|     "husky": "^4.2.3", | ||||
|     "jest": "^25.4.0", | ||||
|     "less": "^3.11.1", | ||||
|     "less-loader": "^5.0.0", | ||||
|     "lint-staged": "^10.0.8", | ||||
|     "node-sass": "^4.13.1", | ||||
|     "prettier": "^1.19.1", | ||||
|     "pretty-quick": "^2.0.1", | ||||
|     "react-test-renderer": "^16.13.1", | ||||
|     "sass-loader": "^8.0.2", | ||||
|     "style-loader": "^1.1.3", | ||||
|     "webpack": "^4.42.0", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sean Macfarlane
					Sean Macfarlane