Skip to content

Commit

Permalink
Merge pull request LedgerHQ#4588 from LedgerHQ/support/LIVE-9251-coll…
Browse files Browse the repository at this point in the history
…ect-coverage-from-config

chore: coverage including untested files
  • Loading branch information
aboissiere-ledger authored Sep 7, 2023
2 parents d2fcdb6 + dd27afe commit 9afd61a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/twenty-ears-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ledger-live-desktop": patch
"live-mobile": patch
---

Fix jest config to generate coverage report and include untested files
7 changes: 7 additions & 0 deletions apps/ledger-live-desktop/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ const defaultConfig = {
};

module.exports = {
collectCoverage: true,
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!src/**/*.test.{ts,tsx}",
"!src/**/*.spec.{ts,tsx}",
],
coverageReporters: ["json", "lcov", "json-summary"],
projects: [
{
...defaultConfig,
Expand Down
7 changes: 6 additions & 1 deletion apps/ledger-live-mobile/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ module.exports = {
],
testPathIgnorePatterns: ["<rootDir>/node_modules/"],
moduleDirectories: ["node_modules"],
coverageReporters: ["json"],
collectCoverage: false,
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!src/**/*.test.{ts,tsx}",
],
coverageReporters: ["json", "lcov", "json-summary"],
coverageDirectory: "<rootDir>/coverage",
moduleNameMapper: {
"^react-native/(.*)$": "<rootDir>/node_modules/react-native/$1",
Expand Down

0 comments on commit 9afd61a

Please sign in to comment.