Skip to content

fix: make mock works with async mock factory#389

Merged
fi3ework merged 1 commit intomainfrom
rstest-async
Jul 24, 2025
Merged

fix: make mock works with async mock factory#389
fi3ework merged 1 commit intomainfrom
rstest-async

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Jul 15, 2025

Summary

Adaption on runtime code and works with web-infra-dev/rspack#11050.

Related Links

Checklist

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

@netlify
Copy link
Copy Markdown

netlify bot commented Jul 15, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 35e6e1c
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/6881ce7000e7530008b3514c
😎 Deploy Preview https://deploy-preview-389--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.

@fi3ework fi3ework marked this pull request as ready for review July 23, 2025 06:52
Copilot AI review requested due to automatic review settings July 23, 2025 06:52
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 fixes mock functionality to work with async mock factories by updating the webpack runtime mock system and refactoring mock-related test files. The changes also include dependency updates across multiple package.json files.

Key changes:

  • Enhanced mock runtime to support async mock factories with proper execution handling
  • Refactored test files to use async mocking patterns and shared utilities
  • Updated @rsbuild/core dependency from 1.4.8 to 1.4.9 across all packages

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.

File Description
packages/core/src/core/plugins/mockRuntime.ts Core mock runtime enhancement to support async factories
tests/mock/tests/*.ts Test files updated to use async mocking and shared utilities
tests/mock/src/*.ts New test source files for mock functionality
*/package.json Dependency version updates for @rsbuild/core
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@fi3ework fi3ework requested a review from 9aoy July 24, 2025 03:17
@fi3ework fi3ework enabled auto-merge (squash) July 24, 2025 03:57
@fi3ework fi3ework merged commit bf8c9c1 into main Jul 24, 2025
16 checks passed
@fi3ework fi3ework deleted the rstest-async branch July 24, 2025 06:15
@9aoy 9aoy mentioned this pull request Jul 24, 2025
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.

3 participants