Skip to content

feat(adapter-rsbuild): export toRstestConfig method#978

Merged
9aoy merged 8 commits intomainfrom
convertRsbuildToRstestConfig
Feb 27, 2026
Merged

feat(adapter-rsbuild): export toRstestConfig method#978
9aoy merged 8 commits intomainfrom
convertRsbuildToRstestConfig

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Feb 25, 2026

Summary

Export the generic Rsbuild->Rstest config conversion logic from @rstest/adapter-rsbuild, you can use toRstestConfig directly when you already have an Rsbuild config object.

import { loadConfig } from '@rsbuild/core';
import { toRstestConfig } from '@rstest/adapter-rsbuild';

const { content: rsbuildConfig } = await loadConfig({
  cwd: process.cwd(),
});

const rstestConfig = toRstestConfig({
  rsbuildConfig,
  environmentName: 'node',
  modifyRsbuildConfig: (config) => ({
    ...config,
    output: {
      ...config.output,
      target: 'node',
    },
  }),
});

Related Links

Checklist

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

@9aoy 9aoy changed the title feat: extracts rsbuild config converter into a new package feat: extract rsbuild config converter into a new package Feb 25, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 505eed82d6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 26, 2026

Deploying rstest with  Cloudflare Pages  Cloudflare Pages

Latest commit: 19c31de
Status: ✅  Deploy successful!
Preview URL: https://3e57d1ac.rstest.pages.dev
Branch Preview URL: https://convertrsbuildtorstestconfig.rstest.pages.dev

View logs

@9aoy 9aoy changed the title feat: extract rsbuild config converter into a new package feat(adapter-rsbuild): export convertRsbuildToRstestConfig method Feb 26, 2026
@9aoy 9aoy changed the title feat(adapter-rsbuild): export convertRsbuildToRstestConfig method feat(adapter-rsbuild): export toRstestConfig method Feb 26, 2026
@9aoy 9aoy requested a review from chenjiahan February 26, 2026 10:01
@9aoy 9aoy merged commit 817f7d7 into main Feb 27, 2026
15 of 17 checks passed
@9aoy 9aoy deleted the convertRsbuildToRstestConfig branch February 27, 2026 03:30
@9aoy 9aoy mentioned this pull request Feb 27, 2026
2 tasks
@fi3ework fi3ework mentioned this pull request Mar 3, 2026
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