chore(NODE-7473): upgrade to chai 5#4958
Open
PavelSafronov wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the project’s testing assertion stack from Chai v4 to Chai v5 (and aligns sinon-chai accordingly), updating the small number of required import interop points and refreshing the lockfile.
Changes:
- Bump
chaito^5.3.3andsinon-chaito^4.0.1, and remove now-unneeded@types/chai/@types/sinon-chaidirect devDependencies. - Update sinon-chai registration to use the default export (
require('sinon-chai').default) in the test runner addon and the Kerberos manual test. - Make dependency test cleanup more resilient by adding
maxRetriestofs.rmSyncwhen removingnode_modules.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/tools/runner/chai_addons.ts | Adjusts sinon-chai plugin loading for the updated sinon-chai package export shape. |
| test/manual/kerberos.test.ts | Keeps manual Kerberos test’s sinon-chai setup compatible with the updated sinon-chai version. |
| test/action/dependency.test.ts | Adds retry behavior when removing node_modules during dependency tests. |
| package.json | Upgrades Chai/sinon-chai versions and removes direct @types/* entries for Chai-related packages. |
| package-lock.json | Updates the lockfile to reflect the Chai v5 dependency graph and sinon-chai v4. |
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
Summary of Changes
Upgrade from chai 4 to chai 5 for testing.
What is the motivation for this change?
QOL enhancement. With chai 5 we get to use some recently-added features, and can fix issues like NODE-7460
Double check the following
npm run check:lint)type(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript