Merge branch 'fix_coverage' into 'master'
Fix coverage reporting See merge request pubsweet/pubsweet!371
No related branches found
No related tags found
Showing
- .gitlab-ci.yml 1 addition, 1 deletion.gitlab-ci.yml
- package.json 102 additions, 14 deletionspackage.json
- packages/cli/package.json 0 additions, 18 deletionspackages/cli/package.json
- packages/client/package.json 0 additions, 8 deletionspackages/client/package.json
- packages/components/package.json 0 additions, 20 deletionspackages/components/package.json
- packages/db-manager/package.json 0 additions, 8 deletionspackages/db-manager/package.json
- packages/logger/package.json 0 additions, 11 deletionspackages/logger/package.json
- packages/server/package.json 0 additions, 5 deletionspackages/server/package.json
- packages/ui/package.json 0 additions, 9 deletionspackages/ui/package.json
- yarn.lock 158 additions, 25 deletionsyarn.lock
... | ... | @@ -31,7 +31,7 @@ |
"scripts": { | ||
"clean": "lerna clean", | ||
"styleguide": "npm run --prefix packages/styleguide styleguide", | ||
"test": "jest --detectOpenHandles", | ||
"test": "jest --no-cache", | ||
"lint": "npm run lint:js && npm run lint:style && npm run lint:json", | ||
"lint:js": "eslint 'packages/**/*.{js,jsx}'", | ||
"lint:style": "stylelint 'packages/**/*.{css,scss}'", | ||
... | ... | @@ -43,21 +43,103 @@ |
"jest": { | ||
"collectCoverage": true, | ||
"collectCoverageFrom": [ | ||
"src/**/*.js", | ||
"packages/cli/src/*.js", | ||
"packages/cli/cli/*.js", | ||
"client/src/**/*.{js,jsx}", | ||
"components/**/*.{js,jsx}", | ||
"db-manager/src/**/*.js", | ||
"logger/src/**/*.js", | ||
"server/src/**/*.js", | ||
"sse/lib/**/*.js", | ||
"ui/src/**/*.{js,jsx}", | ||
"!**/*.test.{js,jsx}", | ||
"!**/node_modules/**" | ||
"**/*.{js,jsx}", | ||
"!**/*test.{js,jsx}", | ||
"!**/test/**", | ||
"!**/node_modules/**", | ||
"!**/config/**", | ||
"!**/coverage/**" | ||
], | ||
"coverageDirectory": "<rootDir>/coverage", | ||
"projects": [ | ||
"packages/*" | ||
{ | ||
"rootDir": "<rootDir>/packages/server", | ||
"displayName": "server", | ||
"testEnvironment": "jest-environment-db", | ||
"testRegex": "/test/.*_test.js$", | ||
"setupTestFrameworkScriptFile": "<rootDir>/test/helpers/jest-setup.js" | ||
}, | ||
{ | ||
"rootDir": "<rootDir>/packages/client", | ||
"displayName": "client", | ||
"testRegex": "/test/.+test.jsx?$", | ||
"setupTestFrameworkScriptFile": "<rootDir>/test/jest-setup.js", | ||
"globals": { | ||
"window": {} | ||
} | ||
}, | ||
{ | ||
"rootDir": "<rootDir>/packages/db-manager", | ||
"displayName": "db-manager", | ||
"testMatch": [ | ||
"**/test/**/*.test.js" | ||
], | ||
"setupTestFrameworkScriptFile": "<rootDir>/test/jest-setup.js", | ||
"testEnvironment": "jest-environment-db" | ||
}, | ||
{ | ||
"rootDir": "<rootDir>/packages/components", | ||
"displayName": "components", | ||
"moduleNameMapper": { | ||
"\\.s?css$": "identity-obj-proxy" | ||
}, | ||
"transformIgnorePatterns": [ | ||
"/node_modules/(?!@?pubsweet)" | ||
], | ||
"testPathIgnorePatterns": [ | ||
"/node_modules", | ||
"config/test" | ||
], | ||
"globals": { | ||
"PUBSWEET_COMPONENTS": [], | ||
"fetch": true | ||
}, | ||
"setupTestFrameworkScriptFile": "<rootDir>/test/jest-setup.js" | ||
}, | ||
{ | ||
"rootDir": "<rootDir>/packages/cli", | ||
"displayName": "cli", | ||
"testMatch": [ | ||
"<rootDir>/test/*.test.js", | ||
"<rootDir>/test/cli/*.test.js" | ||
], | ||
"testPathIgnorePatterns": [ | ||
"<rootDir>/build/" | ||
], | ||
"modulePaths": [ | ||
"<rootDir>/node_modules" | ||
], | ||
"testEnvironment": "jest-environment-db", | ||
"unmockedModulePathPatterns": [ | ||
"/src/models" | ||
], | ||
"setupTestFrameworkScriptFile": "<rootDir>/test/helpers/jest-setup.js", | ||
"verbose": true | ||
}, | ||
{ | ||
"rootDir": "<rootDir>/packages/logger", | ||
"displayName": "logger", | ||
"testMatch": [ | ||
"**/test/**/*test.js" | ||
], | ||
"modulePaths": [ | ||
"<rootDir>/node_modules" | ||
], | ||
"testEnvironment": "node", | ||
"verbose": true, | ||
"setupTestFrameworkScriptFile": "<rootDir>/test/jest-setup.js" | ||
}, | ||
{ | ||
"rootDir": "<rootDir>/packages/ui", | ||
"displayName": "ui", | ||
"moduleNameMapper": { | ||
"\\.s?css$": "identity-obj-proxy" | ||
}, | ||
"setupTestFrameworkScriptFile": "<rootDir>/test/setup/enzyme.js", | ||
"transform": { | ||
"\\.js$": "<rootDir>/test/config/transform.js" | ||
} | ||
} | ||
] | ||
}, | ||
"workspaces": [ | ||
... | ... | @@ -72,5 +154,11 @@ |
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
}, | ||
"dependencies": { | ||
"babel-plugin-istanbul": "https://github.com/jure/babel-plugin-istanbul.git#temp_release" | ||
}, | ||
"resolutions": { | ||
"babel-plugin-istanbul": "https://github.com/jure/babel-plugin-istanbul.git#temp_release" | ||
} | ||
} |
Please register or sign in to comment