Skip to content

Updated node test reporter with node v24 support#6804

Merged
galargh merged 3 commits intov-next-node24from
v-next-node24-reporter
Jun 9, 2025
Merged

Updated node test reporter with node v24 support#6804
galargh merged 3 commits intov-next-node24from
v-next-node24-reporter

Conversation

@galargh
Copy link
Contributor

@galargh galargh commented Jun 5, 2025

Resolves #6792

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

In this PR, I added expected result file versioning with the node major version to the selected note test reporter integration tests. After these changes are introduced, the nested-test fixture will have separate expected result snapshots for node v22 and v24. This will enable us to continue testing the reporter with both versions in CI.

For now, the versioning of result files for the nested-test is hardcoded. If we find more tests that require this in the future, we should either allow the tests to self-identify as such or simply version all the result files.

The other thing from #6681 (comment) that this PR was supposed to address was how the subtest failures are reported, but I'm not sure we should address this.

This is how they are being displayed in node v22 - https://raw.githubusercontent.com/NomicFoundation/hardhat/4093d9c10b59b8086824330900b25d0616369ef1/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/nested-test/result.v22.svg

And this is how they are being displayed in node v24 - https://raw.githubusercontent.com/NomicFoundation/hardhat/4093d9c10b59b8086824330900b25d0616369ef1/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/nested-test/result.v24.svg

Apart from fewer stack trace frames and the lack of a cancelled unawaited test, the outputs are very similar.
The question is whether we should report failure details 5), 6) and 7) at all. I'd argue yes because those failures are for failing its rather than describes (see

) and since it represents a test case, we should have an indication of it failing when one of its "subtests" fails. The reason why we report on these failures after reporting on the subtests is that we display the results as soon as we get them.

@changeset-bot
Copy link

changeset-bot bot commented Jun 5, 2025

⚠️ No Changeset found

Latest commit: 1445e2d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@galargh galargh force-pushed the v-next-node24-reporter branch from 48d7738 to 4093d9c Compare June 5, 2025 15:36
@galargh galargh changed the title [WIP - not ready for review] Updated node test reporter with node v24 support Updated node test reporter with node v24 support Jun 5, 2025
@galargh galargh marked this pull request as ready for review June 5, 2025 16:10
@galargh galargh requested a review from alcuadrado June 5, 2025 16:10
@kanej kanej requested review from kanej and removed request for alcuadrado June 9, 2025 10:42
Copy link
Member

@kanej kanej left a comment

Choose a reason for hiding this comment

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

This looks good for supporting multiple node versions in our node test reporter suite.

I think we should separate out the question of reporting of subtests.

@galargh galargh merged commit 18b2eb2 into v-next-node24 Jun 9, 2025
695 of 699 checks passed
@galargh galargh deleted the v-next-node24-reporter branch June 9, 2025 10:59
@github-project-automation github-project-automation bot moved this from Backlog to Done in Hardhat Jun 9, 2025
@galargh
Copy link
Contributor Author

galargh commented Jun 9, 2025

I think we should separate out the question of reporting of subtests.

Yes, totally! I just wanted to point out that it doesn't look like a regression between v22 and v24 after all.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants