Skip to content

🛠 Repo: Add tests for issues discovered with native import() requiring #5382

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Tooling Suggestion Checklist

Overview

Mocha 11.7.0 included #5366, using require to load ESM when supported in the running Node.js version. This was a great feature add for fixing #5314 & #5317, as well as working towards unblocking nodejs/node#57298.

However, it uncovered at least 2-3 user-reported issues:

The root issue here is that the Mocha repo doesn't test those cases. Which is a problem. We should really have test coverage for these core user flows IMO.

Additional Info

IMO a good next step would be to:

  1. Fill in any examples in https://github.com/mochajs/mocha-examples
  2. Set up "ecosystem" style tests for PRs to make sure all examples are fixed

I think that can be separately tracked / out of scope for this specific issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions