Skip to content

Commit aa159d5

Browse files
authored
Merge pull request #594 from grid-js/cov-test
chore: adding the jest coverage script
2 parents 8d660eb + e35dd56 commit aa159d5

5 files changed

Lines changed: 123 additions & 36 deletions

File tree

.github/workflows/coverage.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'coverage'
1+
name: Code Coverage
22

33
on:
44
pull_request:
@@ -12,7 +12,8 @@ jobs:
1212
env:
1313
CI_JOB_NUMBER: 1
1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v2
16+
- run: npm install
1617
- uses: artiomtr/jest-coverage-report-action@v1.3
1718
with:
1819
github_token: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"typescript": "^4.2.4"
107107
},
108108
"scripts": {
109-
"postinstall": "find . ! -path '*/node_modules/*' ! -path './package.json' -name 'package.json' -execdir npm install \\;",
109+
"postinstall": "find . ! -path '*/node_modules/*' ! -path './package.json' ! -path './tests/dev-server/package.json' -name 'package.json' -execdir npm install \\;",
110110
"clean": "rimraf coverage dist tmp i18n/dist 'plugins/!(node_modules)/dist'",
111111
"prebuild": "npm run clean",
112112
"build": "run-p build:grid build:i18n build:plugins build:themes",
@@ -123,7 +123,7 @@
123123
"test:jest": "jest --coverage --silent --ci --coverage --coverageReporters=\"text\" --coverageReporters=\"text-summary\"",
124124
"test:cypress": "cd tests && cypress run",
125125
"test:check-exports": "check-export-map",
126-
"test:dev-server": "cd tests/dev-server && npm start",
126+
"test:dev-server": "cd tests/dev-server && npm install && npm start",
127127
"test:e2e": "start-server-and-test test:dev-server http://localhost:8080 test:cypress",
128128
"test:watch": "jest --watch"
129129
},

plugins/selection/package-lock.json

Lines changed: 107 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/selection/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"dist/*"
1616
],
1717
"dependencies": {
18-
"gridjs": "^4.0.0"
18+
"gridjs": "../../"
1919
}
2020
}

tests/dev-server/package-lock.json

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)