Skip to content

Commit

Permalink
chore: use node experimental-test-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Aug 15, 2024
1 parent d28aa3b commit 335c51f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@ jobs:
- name: Install Dependencies
run: yarn install --immutable

- name: Configure c8
run: |
echo '{"reports-dir": "docs/coverage"}' > .c8rc.json
- name: Generate Coverage
run: yarn test:coverage:lcov
run: NODE_V8_COVERAGE=./docs/coverage yarn test:coverage:lcov

- name: Create nojekyll
run: touch docs/.nojekyll
Expand Down
3 changes: 3 additions & 0 deletions lib/checkfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function notUsed() {
console.log("not used");
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
"postinstallDev": "pob-root-postinstall",
"test": "node --test lib/**/*.test.js",
"test-typings": "tsc -p typings/tsconfig.json",
"test:coverage": "npx c8 --src ./lib node --test lib/**/*.test.js",
"test:coverage:json": "npx c8 --reporter=json --src ./lib node --test lib/**/*.test.js",
"test:coverage:lcov": "npx c8 --reporter=lcov --src ./lib node --test lib/**/*.test.js",
"test:coverage": "node --test --experimental-test-coverage lib/**/*.test.js",
"test:coverage:json": "node --test --experimental-test-coverage lib/**/*.test.js",
"test:coverage:lcov": "node --test --experimental-test-coverage --test-reporter=lcov lib/**/*.test.js",
"test:watch": "node --test lib/**/*.test.js"
},
"commitlint": {
Expand Down

0 comments on commit 335c51f

Please sign in to comment.