Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 4554124

Browse files
authored
Merge pull request #5937 from matrix-org/jryans/coverage
Add test coverage collection script
2 parents 08e0f15 + e0bcccd commit 4554124

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/*.log
33
package-lock.json
44

5+
/coverage
56
/node_modules
67
/lib
78

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
"lint:types": "tsc --noEmit --jsx react",
5050
"lint:style": "stylelint 'res/css/**/*.scss'",
5151
"test": "jest",
52-
"test:e2e": "./test/end-to-end-tests/run.sh --app-url http://localhost:8080"
52+
"test:e2e": "./test/end-to-end-tests/run.sh --app-url http://localhost:8080",
53+
"coverage": "yarn test --coverage"
5354
},
5455
"dependencies": {
5556
"@babel/runtime": "^7.12.5",
@@ -188,6 +189,12 @@
188189
},
189190
"transformIgnorePatterns": [
190191
"/node_modules/(?!matrix-js-sdk).+$"
192+
],
193+
"collectCoverageFrom": [
194+
"<rootDir>/src/**/*.{js,ts,tsx}"
195+
],
196+
"coverageReporters": [
197+
"text"
191198
]
192199
}
193200
}

0 commit comments

Comments
 (0)