Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix code coverage in github actions #741

Merged
merged 7 commits into from
Feb 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */

module.exports = {
coveragePathIgnorePatterns: ['/dist', '/node_modules'],
coveragePathIgnorePatterns: ['<rootDir>/dist', '<rootDir>/node_modules'],
coverageReporters: ['text'],
coverageThreshold: {
global: {
branches: 80,
Expand All @@ -10,9 +10,8 @@ module.exports = {
statements: 90,
},
},
modulePaths: ['<rootDir>'],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't need to make this and the roots change to get coverage working, we just don't need to set those configs here. rootDir is good enough.

modulePathIgnorePatterns: ['<rootDir>/dist/'],
roots: ['<rootDir>'],
rootDir: __dirname,
setupFiles: ['./__tests__/setup'],
setupFilesAfterEnv: ['jest-extended/all'],
testPathIgnorePatterns: [
Expand Down