Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

  • Capture build logs to make test logs clear.
  • Call proxyConsole by default in the dev and build test helpers.

image

Checklist

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

Copilot AI review requested due to automatic review settings June 18, 2025 07:04
@netlify
Copy link

netlify bot commented Jun 18, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 050cfb0
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/685265d531509d0008a1eb2c
😎 Deploy Preview https://deploy-preview-5437--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: 83 (🟢 up 12 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

Captures build/dev logs through the build/dev helpers instead of manual proxyConsole and adds proper cleanup of helper processes.

  • Removed all manual proxyConsole imports and calls, switching tests to use rsbuild.logs or destructured logs from build/dev.
  • Introduced catchBuildError where tests expect failures and assert rsbuild.buildError.
  • Added await rsbuild.close() or await close() after assertions to clean up processes.

Reviewed Changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
e2e/cases/plugin-less/plugin-hints/index.test.ts Removed proxyConsole, switched to build({ catchBuildError: true }), used rsbuild.logs and rsbuild.close().
e2e/cases/plugin-api/plugin-transform-error-handle/index.test.ts Swapped manual logs for rsbuild.logs, removed restore(), and added rsbuild.close().
e2e/cases/performance/bundle-analyzer/index.test.ts Replaced proxyConsole with rsbuild.logs, added rsbuild.close() in dev test.
e2e/cases/output/clean-dist-path/index.test.ts Dropped proxyConsole, updated second test to use rsbuild.logs and rsbuild.close().
e2e/cases/node-polyfill-tip/without-protocol/index.test.ts Changed to build({ catchBuildError: true }), used rsbuild.logs, asserted rsbuild.buildError, and closed.
e2e/cases/node-polyfill-tip/with-protocol/index.test.ts Same as above for with‐protocol case.
e2e/cases/module/exports-presence/index.test.ts Converted to build({ catchBuildError: true }), used rsbuild.logs, checked buildError, and closed.
e2e/cases/lazy-compilation/port-placeholder/index.test.ts Removed proxyConsole, switched to rsbuild.logs and rsbuild.close().
e2e/cases/lazy-compilation/dynamic-import/index.test.ts Same refactor: drop proxyConsole, use rsbuild.logs, and close.
e2e/cases/lazy-compilation/basic/index.test.ts Identical changes for lazy-compilation basic case.
e2e/cases/javascript-api/custom-logger/index.test.ts Removed manual logs, used rsbuild.logs, and cleaned up with rsbuild.close().
e2e/cases/css/resolve-ts-paths/index.test.ts Dropped try/finally restore(), used rsbuild.close().
e2e/cases/css/nested-npm-import/index.test.ts Removed proxyConsole, replaced logs with rsbuild.logs, and closed.
e2e/cases/css/import-common-css/index.test.ts Same refactor: rsbuild.logs and rsbuild.close().
e2e/cases/css/enable-experiments-css/index.test.ts Updated both tests to use rsbuild.logs and call rsbuild.close().
e2e/cases/config/stats-options/index.test.ts Swapped to rsbuild.logs in both tests and added rsbuild.close().
e2e/cases/config/stats-module-trace/index.test.ts Added catchBuildError, used rsbuild.logs, asserted buildError, and closed.
e2e/cases/config/rspack-config-validate/index.test.ts Refactored both cases to use rsbuild.logs, removed restore(), and closed.
e2e/cases/config/inspect-config/debug.test.ts First test destructures close, second uses rsbuild.close(), and both use rsbuild.logs.
e2e/cases/alias/legacy-alias/index.test.ts Removed proxyConsole, switched to rsbuild.logs, and added rsbuild.close().

@chenjiahan chenjiahan merged commit 3ac461d into main Jun 18, 2025
11 checks passed
@chenjiahan chenjiahan deleted the e2e_capture_logs_0618 branch June 18, 2025 07:14
This was referenced Jun 20, 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.

1 participant