Skip to content

Commit 14dde14

Browse files
committed
ci(test): base coverage testing
1 parent 14a15d4 commit 14dde14

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
- run: npm install
5050
- name: Install webpack ${{ matrix.webpack-version }}
5151
run: npm i webpack@${{ matrix.webpack-version }}
52-
- run: npm run test
52+
- run: npm run test:coverage

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
/coverage

jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
// collectCoverageFrom: null,
2525

2626
// The directory where Jest should output its coverage files
27-
// coverageDirectory: null,
27+
coverageDirectory: "coverage",
2828

2929
// An array of regexp pattern strings used to skip coverage collection
3030
// coveragePathIgnorePatterns: [

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"scripts": {
1111
"prepublishOnly": "npm run lint",
1212
"lint": "eslint index.js",
13-
"test": "jest"
13+
"test": "jest",
14+
"test:coverage": "jest --coverage"
1415
},
1516
"husky": {
1617
"hooks": {

0 commit comments

Comments
 (0)