Skip to content

Commit d0fa720

Browse files
committed
Use coverage-node to enforce 100% code coverage for tests.
1 parent d42e5f7 commit d0fa720

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
### Patch
1313

1414
- Updated dependencies.
15+
- Use [`coverage-node`](https://npm.im/coverage-node) to enforce 100% code coverage for tests.
1516
- Increased the universal API size-limit from 3 KB to 3.5 KB.
1617
- Updated the `useGraphQL` React hook examples to use the [GitHub GraphQL API](https://docs.github.com/en/graphql).
1718
- Improved the `useGraphQL` React hook tests.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"@babel/preset-react": "^7.10.4",
7575
"@size-limit/preset-small-lib": "^4.6.0",
7676
"babel-eslint": "^10.1.0",
77+
"coverage-node": "^3.0.0",
7778
"eslint": "^7.9.0",
7879
"eslint-config-env": "^15.0.1",
7980
"eslint-config-prettier": "^6.11.0",
@@ -109,7 +110,7 @@
109110
"test": "npm run test:eslint && npm run test:prettier && npm run test:api && npm run test:size",
110111
"test:eslint": "eslint --ext mjs,js .",
111112
"test:prettier": "prettier -c .",
112-
"test:api": "node -r hard-rejection/register test",
113+
"test:api": "coverage-node -r hard-rejection/register test",
113114
"test:size": "size-limit",
114115
"prepublishOnly": "npm test"
115116
}

0 commit comments

Comments
 (0)