Skip to content

chore(NODE-7473): upgrade to chai 5#4958

Open
PavelSafronov wants to merge 2 commits into
mainfrom
node-7473
Open

chore(NODE-7473): upgrade to chai 5#4958
PavelSafronov wants to merge 2 commits into
mainfrom
node-7473

Conversation

@PavelSafronov

Copy link
Copy Markdown
Contributor

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

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@PavelSafronov PavelSafronov marked this pull request as ready for review June 8, 2026 17:33
@PavelSafronov PavelSafronov requested a review from a team as a code owner June 8, 2026 17:33
Copilot AI review requested due to automatic review settings June 8, 2026 17:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 chai to ^5.3.3 and sinon-chai to ^4.0.1, and remove now-unneeded @types/chai / @types/sinon-chai direct 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 maxRetries to fs.rmSync when removing node_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants