Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Lightning00Blade
Copy link
Contributor

@Lightning00Blade Lightning00Blade commented Dec 3, 2025

PR Checklist

Overview

A very simple (and rough) PR to show case where the issue is. It only unwraps modules default if present.

@mark-wiemer mark-wiemer marked this pull request as draft December 4, 2025 01:37
@mark-wiemer
Copy link
Member

Thanks @Lightning00Blade , can you add a unit test that would've failed before but passes with your code changes?

@Lightning00Blade Lightning00Blade marked this pull request as ready for review December 17, 2025 12:03
@@ -1 +1 @@
{".":"12.0.0-beta-2"}
{ ".": "12.0.0-beta-2" }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

npm run format changes this also does it on main

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, #5569 - that's not intentional.

@Lightning00Blade
Copy link
Contributor Author

@mark-wiemer I added the requested tests verified they don't pass on main.

I also strongly want to emphasize that PR #5344 should be merged as well,
even without test as where this bug was happening was easier once I had similar patch applied to the one proposed in the PR.

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

āŒ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
āœ… Project coverage is 93.51%. Comparing base (410ce0d) to head (b9d9150).

Files with missing lines Patch % Lines
lib/mocha.js 75.00% 1 Missing āš ļø
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5563      +/-   ##
==========================================
- Coverage   93.52%   93.51%   -0.02%     
==========================================
  Files          57       57              
  Lines        4465     4469       +4     
  Branches      918      920       +2     
==========================================
+ Hits         4176     4179       +3     
- Misses        289      290       +1     

ā˜” View full report in Codecov by Sentry.
šŸ“¢ 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.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Super. I verified locally that this passes with the repro case in #5562 (comment). Just one more test and I think we'll be good to go! šŸš€

}
}
if (bindInterface.default) {
bindInterface = bindInterface.default;
Copy link
Member

Choose a reason for hiding this comment

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

[Testing] Codecov's āŒ is because this line isn't covered in tests. Which is a good point - the test only verifies that the --require form works:

["--require", simpleUiESMPath, "--ui", "simple-ui"]

This PR should also test that the --ui form works:

["--ui", simpleUiESMPath]

@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for author waiting on response from OP or other posters - more information needed label Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting for author waiting on response from OP or other posters - more information needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

šŸ› Bug: Can't ESM (default) import custom interfaces and reporters

3 participants