Skip to content

Conversation

@bdkopen
Copy link
Contributor

@bdkopen bdkopen commented Oct 23, 2025

Replaces expect-legacy with chai.

expect-legacy is an unmaintained fork of expect. It appears to be a fork because expect joined the jest project. Given that the fork hasn't been updated in 8 years and has 99 sub-dependencies, it's a good time to migrate.

chai is good fit because it's often used with mocha already and is a recommended package on the mocha docs. It keeps this update simple because moving everything to jest would include migrating away from mocha. Since mocha and chai are both well maintained, this doesn't seem necessary at this point.

The toExist function in expect is just checking for a truthy value, so to.be.ok is the equivalent in chai. Similarly, toBe is replaced with to.equal.

Please let me know if any changes are necessary. Thanks!

Copy link
Owner

@jeffbski jeffbski left a comment

Choose a reason for hiding this comment

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

@bdkopen Thanks for doing this upgrade to a better package.

@jeffbski jeffbski merged commit 36bb96a into jeffbski:master Nov 8, 2025
4 checks passed
@jeffbski
Copy link
Owner

jeffbski commented Nov 8, 2025

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