Added unit test coverage config (#2513)

This commit is contained in:
darth-coder00 2022-01-31 22:09:00 +05:30 committed by GitHub
parent 1588b8c83d
commit 92d6e943db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 8 deletions

1
.gitignore vendored
View File

@ -69,6 +69,7 @@ secrets
# ts build info and report
openmetadata-ui/src/main/resources/ui/webpack
openmetadata-ui/src/main/resources/ui/tsconfig.tsbuildinfo
openmetadata-ui/src/main/resources/ui/src/test
#tests
.coverage

View File

@ -21,12 +21,12 @@ module.exports = {
// Test files
testMatch: ['<rootDir>/src/**/*.test.{ts,tsx,js,jsx}'], // All test files in subdirectories under /src
// // Test coverage
// coverageDirectory: "<rootDir>/src/test/unit/coverage",
// collectCoverageFrom: [
// "<rootDir>/src/**/*.{ts,tsx,js,jsx}", // All files in subdirectories under src/app
// "!<rootDir>/src/*", // Exclude files directly under src/app
// ],
// Test coverage
coverageDirectory: "<rootDir>/src/test/unit/coverage",
collectCoverageFrom: [
"<rootDir>/src/**/*.{ts,tsx,js,jsx}", // All files in subdirectories under src/app
"!<rootDir>/src/*", // Exclude files directly under src/app
],
// TypeScript
// preset: 'ts-jest',

View File

@ -72,8 +72,9 @@
"start": "NODE_ENV=development BABEL_ENV=development webpack serve --config ./webpack.config.dev.js --env development",
"build": "NODE_ENV=production BABEL_ENV=production webpack --config ./webpack.config.prod.js --env production",
"preinstall": "cd ../../../../.. && yarn install --frozen-lockfile",
"test": "jest --passWithNoTests --watch",
"test:nowatch": "jest --passWithNoTests",
"test": "jest --passWithNoTests",
"test:watch": "jest --passWithNoTests --watch",
"test:coverage": "jest --passWithNoTests --coverage",
"lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\"",
"lint:fix": "eslint './src/**/*.{js,jsx,ts,tsx}' --fix",
"pretty": "prettier . --config './.prettierrc' --write",