test: use ESM test files#66
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 357134b28f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,3 +0,0 @@ | |||
| { | |||
There was a problem hiding this comment.
Preserve native ESM config coverage
With this package scope removed, the fixture rsbuild.config.ts files are now loaded under the root "type": "module", but they still import the built package via the relative directory specifier ../../dist (for example, test/basic/rsbuild.config.ts). Native Node ESM rejects relative directory imports, so loadConfig()'s default auto loader falls back to jiti instead of exercising the standard ESM semantics this change is meant to test; update the fixture imports to the explicit built entry (for example ../../dist/index.js) or force the native loader so regressions in native ESM loading are actually caught.
Useful? React with 👍 / 👎.
Summary
This PR updates the Playwright tests to run with standard ESM semantics instead of relying on a
test/package.jsonCommonJS scope. The tests now useimport.meta.dirnamefor fixture paths andcreateRequire(import.meta.url)only where they need to verify the CommonJS UMD output, so Rsbuild config files are loaded under the repository's normal module scope.Related Links
#63