Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

  • Simplify Rstest config, remove unused fields.
  • Remove unused test helpers.

Checklist

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

Copilot AI review requested due to automatic review settings July 7, 2025 10:47
@netlify
Copy link

netlify bot commented Jul 7, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit de27289
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/686ba5debee7af00098b44e2
😎 Deploy Preview https://deploy-preview-5556--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 70 (🔴 down 6 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

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 simplifies the RSTest configuration and cleans up unused test helper code by removing redundant fields and helper functions.

  • Removed unused path helper functions from the test-helper module
  • Stripped out obsolete config options (color/console mocks, timeout, environment, exclude) from rstest.config.ts

Reviewed Changes

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

File Description
scripts/test-helper/src/index.ts Removed isPathString and isRelativePath
rstest.config.ts Dropped unused RSTest config properties
Comments suppressed due to low confidence (2)

scripts/test-helper/src/index.ts:11

  • The removal of isPathString and isRelativePath may break any existing tests or code paths that reference these helpers. Please update or remove any imports or usages in tests or other modules.
} from '@rsbuild/core';

rstest.config.ts:4

  • By removing the mocked Console setup, any tests relying on the console override could start failing. Ensure that mock behavior is no longer needed or restore it if tests expect it.
process.env.NO_COLOR = '1';

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Test Timeouts Cause Integration Failures

Removing testTimeout: 30000 causes tests to use the default timeout (typically 5 seconds). This will lead to previously passing tests that take 6-30 seconds, especially integration tests or those involving file I/O, to fail with timeout errors.

rstest.config.ts#L16-L18

rsbuild/rstest.config.ts

Lines 16 to 18 in de27289

name: 'node',
globals: true,
restoreMocks: true,

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

@chenjiahan chenjiahan merged commit 309c18c into main Jul 7, 2025
13 checks passed
@chenjiahan chenjiahan deleted the rstest_config_0707 branch July 7, 2025 13:08
@chenjiahan chenjiahan mentioned this pull request Jul 8, 2025
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