Commit 8f71bec
committed
test: improve test coverage from 83.78% to 84.10%
Add comprehensive HTTP mocking tests for github.ts and edge case tests for objects.ts:
- Add nock dev dependency (14.0.10) for HTTP mocking infrastructure
- Add 14 tests for github.ts covering fetchGitHub, resolveRefToSha, fetchGhsaDetails, and cacheFetchGhsa
- HTTP success and error handling (rate limits, 403, 404)
- Authorization headers and custom headers
- Tag, annotated tag, branch, and commit SHA resolution
- GHSA advisory fetching and caching
- Add 7 tests for objects.ts covering internal attributes access and merge edge cases
- Internal kInternalsSymbol getters (attributes, lazyGetterStats)
- Merge behavior with null/undefined target/source
- Array merging skip branches
- Improve objects.ts coverage from 96.12% to 97.67% with 100% function coverage
- Improve github.ts coverage significantly from 19.48%
- Update README badge to reflect new coverage: 84.10%1 parent a0900d1 commit 8f71bec
File tree
5 files changed
+405
-1
lines changed- test/unit
5 files changed
+405
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
| 745 | + | |
745 | 746 | | |
746 | 747 | | |
747 | 748 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments