1
0
Fork 0
mirror of https://github.com/imjasonh/govulncheck-action synced 2026-07-08 08:45:48 +00:00
Commit graph

2 commits

Author SHA1 Message Date
c4a3cd53b0 build: migrate to ESM and esbuild
Updates the project to use ESM modules and replaces ncc with esbuild. This fixes build failures caused by newer @actions/core versions which use strict ESM exports that ncc cannot resolve.

Also updates tests to use ESM and dependency injection.

Signed-off-by: Jason Hall <imjasonh@gmail.com>
2026-02-21 02:54:49 -05:00
Jason Hall
6f111796c8
Improve test coverage to 99.64%
Added comprehensive test cases to achieve near-perfect test coverage:

## Coverage Improvements
- **Statements**: 99.65% (from 76.2%)
- **Branches**: 81.06% (from 55.02%)
- **Functions**: 100% (from 78.57%)
- **Lines**: 99.64% (from 76.97%)

## New Test Files
- `test/summary.test.js`: Complete test suite for summary generation
- `test/index-main.test.js`: Test for main module execution

## Enhanced Test Cases
- Added tests for large output truncation
- Added tests for OSV details with CVE aliases
- Added tests for vulnerabilities without OSV IDs
- Added tests for fixed version recommendations
- Added tests for module call sites and suggested edits
- Added tests for multi-line JSON parsing
- Added tests for error handling edge cases

The only remaining uncovered line is the main module execution check,
which is inherently difficult to test in a unit testing environment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 01:44:32 -04:00