Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Sep 29, 2025

Summary

update jest api alternative.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings September 29, 2025 03:52
@netlify
Copy link

netlify bot commented Sep 29, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 5626a2e
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68da028157570600085f8266
😎 Deploy Preview https://deploy-preview-603--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
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 updates Jest migration documentation to provide clearer guidance for developers migrating from Jest to Rstest, with enhanced configuration mapping and API alternatives.

  • Added configuration mapping section headers and expanded Jest-to-Rstest configuration equivalents table
  • Added code transformation examples showing how to migrate from Jest's babel-jest to Rstest's swc configuration
  • Added sections for handling done callbacks and timeout settings with specific migration examples

Reviewed Changes

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

File Description
website/docs/zh/guide/migration/jest.mdx Chinese documentation updates with configuration mappings, transformation examples, and API alternatives
website/docs/en/guide/migration/jest.mdx English documentation updates with same enhancements as Chinese version

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

| `testRegex` | [`include`](/config/test/include) |
| `testMatch` | [`include`](/config/test/include) |
| `testPathIgnorePatterns` | [`exclude`](/config/test/exclude) |
| `transformIgnorePatterns` | [`output.externals`](/config/build/output#outputexternals)[`source.exclude`](/config/build/source#sourceexclude) |
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Mixed language punctuation: using Chinese punctuation '、' in English-style table. Consider using comma ',' for consistency with the table format.

Suggested change
| `transformIgnorePatterns` | [`output.externals`](/config/build/output#outputexternals)[`source.exclude`](/config/build/source#sourceexclude) |
| `transformIgnorePatterns` | [`output.externals`](/config/build/output#outputexternals), [`source.exclude`](/config/build/source#sourceexclude) |

Copilot uses AI. Check for mistakes.
| `testRegex` | [`include`](/config/test/include) |
| `testMatch` | [`include`](/config/test/include) |
| `testPathIgnorePatterns` | [`exclude`](/config/test/exclude) |
| `transformIgnorePatterns` | [`output.externals`](/config/build/output#outputexternals)[`source.exclude`](/config/build/source#sourceexclude) |
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Using Chinese punctuation '、' in English documentation. Should use comma ',' or 'and' to separate the two configuration options.

Suggested change
| `transformIgnorePatterns` | [`output.externals`](/config/build/output#outputexternals)[`source.exclude`](/config/build/source#sourceexclude) |
| `transformIgnorePatterns` | [`output.externals`](/config/build/output#outputexternals), [`source.exclude`](/config/build/source#sourceexclude) |

Copilot uses AI. Check for mistakes.
@9aoy 9aoy merged commit 9cd1456 into main Sep 29, 2025
17 checks passed
@9aoy 9aoy deleted the docs/jest-api branch September 29, 2025 04:38
@9aoy 9aoy mentioned this pull request Sep 30, 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.

2 participants