Skip to content

docs: add mocking re-exported modules tip#817

Merged
9aoy merged 6 commits intomainfrom
docs/re-exported
Dec 30, 2025
Merged

docs: add mocking re-exported modules tip#817
9aoy merged 6 commits intomainfrom
docs/re-exported

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Dec 30, 2025

Summary

add mocking re-exported modules tip.

Related Links

#809

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 30, 2025 06:32
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 30, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 38c8592
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/6953802ec33df800080597ca
😎 Deploy Preview https://deploy-preview-817--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds documentation for a common issue when mocking re-exported modules in testing scenarios. It explains how Rspack's optimization can cause re-exports to be resolved directly to their source module, which can interfere with module mocking.

Key Changes:

  • Added FAQ section explaining re-export mocking behavior
  • Provided two solutions: mock the actual resolved module or disable the optimization
  • Included both English and Chinese documentation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
website/docs/en/api/runtime-api/rstest/mock-modules.mdx Adds FAQ section with mocking re-exported modules tip in English
website/docs/zh/api/runtime-api/rstest/mock-modules.mdx Adds FAQ section with mocking re-exported modules tip in Chinese

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@9aoy 9aoy merged commit 81d4078 into main Dec 30, 2025
16 checks passed
@9aoy 9aoy deleted the docs/re-exported branch December 30, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants