Conversation
- Add test:coverage script to package.json - Install c8 for ES module coverage reporting - Add .c8rc.json configuration file - Coverage reports generated in coverage/ directory (text, HTML, LCOV)
There was a problem hiding this comment.
Pull request overview
This PR merges the develop branch into master, bringing dependency updates and test coverage infrastructure improvements to the main branch. The changes primarily focus on keeping dependencies up-to-date and introducing code coverage reporting capabilities using c8.
Key changes:
- Updates 5 dependencies (chai, sinon, openai, posthog-node, selfsigned) to their latest versions
- Introduces c8 coverage tool with configuration for generating text, HTML, and LCOV reports
- Bumps project version from 2.0.1 to 2.2.0
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Adds c8 dev dependency, updates chai/sinon/openai/posthog-node/selfsigned versions, adds test:coverage script, and correctly alphabetizes @simplewebauthn/server |
| package-lock.json | Reflects all dependency updates with their transitive dependencies, updates version to 2.2.0, and increases Node.js engine requirement from >=7.5 to >=17.0.0 |
| .c8rc.json | New coverage configuration file excluding test files and config, with text/html/lcov reporters and coverage checks disabled |
| "scripts": { | ||
| "pretest": "if [ ! -f 'config/config.json' ]; then cp 'config/config.json.example' 'config/config.json'; fi", | ||
| "test": "NODE_ENV=test mocha --reporter spec 'test/**/*.mjs' --ignore 'test/tools/**' --exit", | ||
| "test:coverage": "NODE_ENV=test c8 --reporter=text --reporter=html --reporter=lcov mocha --reporter spec 'test/**/*.mjs' --ignore 'test/tools/**' --exit", |
There was a problem hiding this comment.
The test:coverage script explicitly specifies reporters (--reporter=text --reporter=html --reporter=lcov) that are already configured in .c8rc.json. This creates redundant configuration. Consider removing the reporter flags from the script and relying solely on the .c8rc.json configuration for consistency and easier maintenance.
| "test:coverage": "NODE_ENV=test c8 --reporter=text --reporter=html --reporter=lcov mocha --reporter spec 'test/**/*.mjs' --ignore 'test/tools/**' --exit", | |
| "test:coverage": "NODE_ENV=test c8 mocha --reporter spec 'test/**/*.mjs' --ignore 'test/tools/**' --exit", |
Summary
This PR merges all changes from
developintomaster, including dependency updates and test coverage improvements.Changes
Dependency Updates
Test Coverage
test:coveragescript to package.jsonPrevious Changes (from earlier PRs)
Testing
✅ All integration tests passing (21/21 tests)
npm run test:integration:verboseFiles Changed
package.json- Dependency versions updatedpackage-lock.json- Dependency tree updated.c8rc.json- Coverage configuration (new file)Commits: ~2 commits ahead of master
Status: Ready to merge