Add Tests workflow and replace Jest with node:test#40
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates testing from Jest to Node.js’s built-in node:test, adds a GitHub Actions workflow for tests and coverage, removes Jest and Travis CI config, updates package scripts and README badges, and bumps the minimum Node.js version to 20.
- Replace Jest with
node:testin all test files and introduce a sharedtest-http-errorutil. - Remove
jest.jsonand.travis.yml, updatepackage.jsonscripts, and add.github/tests.yamlworkflow. - Update README with new test instructions, status badges, and bump engines to Node.js ≥20.
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utils/test-http-error.js | Updated to use node:test’s it and assert, replaced Jest API |
| test/errors/*_test.js | Replaced Jest imports with node:test and calls to testHttpError |
| package.json | Updated test scripts, removed Jest dependency, bumped Node engine |
| jest.json | Removed (no longer needed) |
| README.md | Added badges and updated test instructions |
| .travis.yml | Removed Travis CI config |
| .github/tests.yaml | Added GitHub Actions workflow for tests and coverage |
Comments suppressed due to low confidence (1)
test/utils/test-http-error.js:14
- Parameter
Errorshadows the global Error constructor. Consider renaming it toErrorClassorHttpErrorConstructorfor clarity.
module.exports = (Error, code, message, testArguments = true) => {
a8d6de7 to
7b5a858
Compare
Kamefrede
reviewed
Jun 4, 2025
- Remove `jest` - Update minimum Node.js version to 20 - Update `README.md` with NPM and Tests badges, and updated test instructions
7b5a858 to
524c9fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
node:test.READMEwith new test instructions and status badges.