Skip to content

chore(deps): bump unexpected to 13 and remove unused plugins - #6135

Merged
mark-wiemer merged 15 commits into
mochajs:mainfrom
JoshuaKGoldberg:unexpected-13-and-cleanup
Jul 20, 2026
Merged

mark-wiemer merged 15 commits into
mochajs:mainfrom
JoshuaKGoldberg:unexpected-13-and-cleanup

Conversation

@JoshuaKGoldberg

@JoshuaKGoldberg JoshuaKGoldberg commented Jul 4, 2026 •

Copy link
Copy Markdown
Member

PR Checklist

Overview

Supersedes #5730. The failures were from the old unexpected-map and unexpected-set packages not supporting unexpected@13:

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: mocha@12.0.0-rc.1
npm error Found: unexpected@13.2.1
npm error node_modules/unexpected
npm error   dev unexpected@"^13.2.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer unexpected@"^10.37.4 || ^11.0.0-4 || ^12.0.0" from unexpected-set@3.3.0
npm error node_modules/unexpected-set
npm error   dev unexpected-set@"^3.3.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an inc

But we only barely use those packages' additions. I was able to rewrite them all with just a few lines of code:

  • plugin-loader.spec.cjs: using the nice new Object.fromEntries()
  • parallel.spec.cjs: an odd side effect of the plugins that I rewrote to just use a couple more manual assertions.

Note that unexpected-eventemitter and unexpected-sinon are used: search "to emit from" and "was called, respectively.

@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the unexpected-13-and-cleanup branch from b8b19c7 to 5904b3c Compare July 4, 2026 16:37
@JoshuaKGoldberg

This comment was marked as resolved.

@JoshuaKGoldberg
JoshuaKGoldberg marked this pull request as ready for review July 6, 2026 16:33
@mark-wiemer

Copy link
Copy Markdown
Member

On phone on bus, @JoshuaKGoldberg can you explain the test failure?

@JoshuaKGoldberg

Copy link
Copy Markdown
Member Author

I thought it was just flake

mark-wiemer
mark-wiemer previously approved these changes Jul 19, 2026
@mark-wiemer

Copy link
Copy Markdown
Member

"should instantiate a Runner" timed out on both of the first two runs. No other issues. I don't recognize this unit test as a known flaky test though.

@mark-wiemer

Copy link
Copy Markdown
Member

@JoshuaKGoldberg the test is consistently failing, can you check it out?

@mark-wiemer mark-wiemer changed the title chore(deps): bump unexpected to 13, and remove unused plugins chore(deps): bump unexpected to 13 and remove unused plugins Jul 19, 2026
@codecov

codecov Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 82.64%. Comparing base (9f85d71) to head (1168a92).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6135      +/-   ##
==========================================
+ Coverage   82.57%   82.64%   +0.07%     
==========================================
  Files          62       62              
  Lines        4649     4668      +19     
  Branches      997     1034      +37     
==========================================
+ Hits         3839     3858      +19     
  Misses        810      810              

β˜” View full report in Codecov by Harness.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mark-wiemer
mark-wiemer merged commit b587012 into mochajs:main Jul 20, 2026
79 checks passed
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