Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minitest -> v15.19.0 & mocha -> v2.1.0 #8015

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

floehopper
Copy link
Contributor

@floehopper floehopper commented Jul 27, 2023

In minitest v15.19.0, the very old MiniTest module name has been dropped, so we need to use the Minitest module name everywhere. This also requires us to upgrade mocha to v2.1.0. See freerange/mocha#614 for more details.

@floehopper floehopper force-pushed the test-mocha-minitest-fix branch 2 times, most recently from 30569e6 to 68efaa2 Compare July 27, 2023 10:01
floehopper added a commit to freerange/mocha that referenced this pull request Jul 27, 2023
It turns out we were relying on the very old [1] MiniTest module name
rather than the newer Minitest module name. While there are other places
in the code that use the MiniTest form, most (all?) of those are
internal to Mocha. Anyway making this one change seems to fix the
problems people are having.

Ideally I'd like to add a failing test to force me to make this change,
but I don't have time right now and I want to fix the problem for people
as soon as possible. I've run this fix against a large test suite and
the build passes [2], so it doesn't feel very risky releasing this.

It would also be good to do a general clean up of all the uses of
MiniTest to make sure I haven't missed anything.

Fixes #614.

[1]: https://github.com/minitest/minitest/blob/master/History.rdoc#505--2013-06-20-
[2]: alphagov/whitehall#8015
The mocha update is required to retain compatibility with minitest. See
freerange/mocha#614 for more details.
@floehopper floehopper changed the title WIP: Test Mocha/Minitest compatibility fix Update minitest -> v15.19.0 & mocha -> v2.1.0 Jul 27, 2023
@floehopper floehopper marked this pull request as ready for review July 27, 2023 11:19
Copy link
Member

@kevindew kevindew left a comment

Choose a reason for hiding this comment

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

Looks great - thanks for doing this so fast.

@floehopper floehopper merged commit 0f6d9ff into main Jul 27, 2023
@floehopper floehopper deleted the test-mocha-minitest-fix branch July 27, 2023 11:32
ywenc pushed a commit to ywenc/mocha that referenced this pull request Aug 10, 2023
It turns out we were relying on the very old [1] MiniTest module name
rather than the newer Minitest module name. While there are other places
in the code that use the MiniTest form, most (all?) of those are
internal to Mocha. Anyway making this one change seems to fix the
problems people are having.

Ideally I'd like to add a failing test to force me to make this change,
but I don't have time right now and I want to fix the problem for people
as soon as possible. I've run this fix against a large test suite and
the build passes [2], so it doesn't feel very risky releasing this.

It would also be good to do a general clean up of all the uses of
MiniTest to make sure I haven't missed anything.

Fixes freerange#614.

[1]: https://github.com/minitest/minitest/blob/master/History.rdoc#505--2013-06-20-
[2]: alphagov/whitehall#8015
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