Skip to content

test(e2e): standardize log assertions and improving reliability#5869

Merged
chenjiahan merged 4 commits intomainfrom
log_matcher_0818
Aug 18, 2025
Merged

test(e2e): standardize log assertions and improving reliability#5869
chenjiahan merged 4 commits intomainfrom
log_matcher_0818

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

  • Standardized log assertions with the new rsbuild.expectLog() helper and improving reliability.
  • Fixed some invalid log assertions.

Checklist

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

Copilot AI review requested due to automatic review settings August 18, 2025 05:16
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 18, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 5687fe7
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68a2b97c11da070009b573ff
😎 Deploy Preview https://deploy-preview-5869--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: 67 (🔴 down 5 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
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 standardizes log assertions throughout the e2e test suite by refactoring the log handling utilities and replacing manual log inspections with a centralized expectLog() helper, improving test reliability and maintainability.

Key changes:

  • Moved log handling utilities from scripts/ to helper/ directory with improved structure
  • Created a new createLogMatcher() utility that provides standardized log assertion methods
  • Replaced manual log array inspections with the new expectLog() helper across 25+ test files

Reviewed Changes

Copilot reviewed 30 out of 32 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
e2e/tsconfig.json Updated include path from "scripts" to "helper"
e2e/scripts/package.json Removed old package.json from scripts directory
e2e/scripts/cli.ts Removed old CLI utilities file
e2e/helper/utils.ts Removed legacy proxyConsole and matchPattern utilities
e2e/helper/package.json Added new package.json with picocolors dependency
e2e/helper/logs.ts New centralized log handling utilities with createLogMatcher
e2e/helper/jsApi.ts Updated to use new log utilities and removed captureLogs options
e2e/helper/index.ts Updated exports to include new log utilities
e2e/helper/cli.ts New CLI utilities using standardized log matching
e2e/cases/*/*.test.ts Multiple test files updated to use expectLog() instead of manual log inspection
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

@chenjiahan chenjiahan merged commit 5a45805 into main Aug 18, 2025
11 checks passed
@chenjiahan chenjiahan deleted the log_matcher_0818 branch August 18, 2025 05:33
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