Skip to content

test: update CJS external rendering assertions - #1929

Merged
Timeless0911 merged 1 commit into
mainfrom
david/fix-update-cjs-rendering-tests
Sep 18, 2026
Merged

Timeless0911 merged 1 commit into
mainfrom
david/fix-update-cjs-rendering-tests

Conversation

@Timeless0911

@Timeless0911 Timeless0911 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Motivation

Rspack #15238 changed how eligible CommonJS externals are rendered in modern-module output. The existing Rslib integration assertions expected the previous module.exports factory output, causing the Rspack ecosystem CI externals suite to fail.

Related: web-infra-dev/rspack#15238

Changes

Update the externals integration assertions for the new direct CJS rendering in Node and web targets, while preserving checks for require, createRequire, bundled CommonJS wrappers, and lazy imports.

Validation: built Rspack commit 475c7ad20f locally and ran tests/integration/externals/index.test.ts with 10/10 tests passing. Lint and format checks also pass.

Closes #1931

@Timeless0911
Timeless0911 force-pushed the david/fix-update-cjs-rendering-tests branch 4 times, most recently from 1be3dea to ce95a05 Compare September 18, 2026 09:31
@Timeless0911
Timeless0911 force-pushed the david/fix-update-cjs-rendering-tests branch from ce95a05 to 87ffa11 Compare September 18, 2026 09:37
@Timeless0911
Timeless0911 marked this pull request as ready for review September 18, 2026 09:38
Copilot AI lite review requested due to automatic review settings September 18, 2026 09:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved review issues remain.

Pull request overview

Updates externals integration assertions for Rspack’s direct CommonJS rendering in modern-module output.

Changes:

  • Update Node and web assertions for direct require/createRequire calls.
  • Preserve checks for bundled wrappers and lazy imports.
File summaries
File Summary
tests/integration/externals/index.test.ts Updates external-rendering expectations.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Timeless0911
Timeless0911 merged commit c3c5797 into main Sep 18, 2026
12 checks passed
@Timeless0911
Timeless0911 deleted the david/fix-update-cjs-rendering-tests branch September 18, 2026 09:58
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