Skip to content

Commit

Permalink
fix: coverage setup
Browse files Browse the repository at this point in the history
  • Loading branch information
rflechtner committed Jul 25, 2023
1 parent 2b4b22e commit 2a78873
Showing 1 changed file with 33 additions and 26 deletions.
59 changes: 33 additions & 26 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,48 @@ const common = {
moduleDirectories: [
"node_modules",
"packages/*/src"
]
],
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 70,
functions: 80,
lines: 80,
statements: 80,
},
},
collectCoverageFrom: [
'packages/*/src/**',
],
coveragePathIgnorePatterns: [
'/node_modules/',
'/lib/',
'/tests/',
'packages/types/',
'packages/augment-api/',
'packages/type-definitions/',
'packages/utils/src/json-schema/',
'packages/core/src/kilt/',
'index.ts',
'types.ts',
'.chain.ts',
'SDKErrors.ts',
'Did.chain.ts',
'Did.rpc.ts',
'Did.utils.ts',
'jsonabc.ts',
'packages/core/src/utils.ts',
],
}

module.exports = {
...common,
testTimeout: 5000,
projects: [
{
...common,
displayName: 'unit',
roots: ['<rootDir>/packages'],
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 70,
functions: 80,
lines: 80,
statements: 80,
},
},
collectCoverageFrom: [
'packages/*/src/**/*.ts',
'!**/index.ts',
'!**/kilt/*',
'!**/SDKErrors.ts',
'!**/*.chain.ts',
'!packages/types/**/*',
'!packages/utils/src/json-schema/*',
'!packages/augment-api/**',
'!packages/type-definitions/**',
'!packages/did/src/Did.chain.ts',
'!packages/did/src/Did.rpc.ts',
'!packages/did/src/Did.utils.ts',
'!packages/utils/src/jsonabc.ts',
'!packages/core/src/utils.ts',
],
},
{
...common,
Expand Down

0 comments on commit 2a78873

Please sign in to comment.