Skip to content

test(e2e): simplify runtime log assertions#5874

Merged
chenjiahan merged 1 commit intomainfrom
e2e_log_assertions_0818
Aug 18, 2025
Merged

test(e2e): simplify runtime log assertions#5874
chenjiahan merged 1 commit intomainfrom
e2e_log_assertions_0818

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Replace expectPoll with the expectLog helper for cleaner test assertions.

Checklist

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

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

netlify bot commented Aug 18, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 1ac3ae2
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68a2fc6e11da070009c0c491
😎 Deploy Preview https://deploy-preview-5874--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: 68 (🔴 down 4 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 refactors test assertions to use the expectLog helper instead of expectPoll for cleaner and more specific log-based assertions in e2e tests.

  • Replace manual log array management with the createLogMatcher helper
  • Simplify log pattern matching by using expectLog instead of expectPoll
  • Enhance LogPattern type to support function-based matching

Reviewed Changes

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

File Description
e2e/helper/logs.ts Enhanced LogPattern type to support function patterns and updated type signatures
e2e/cases/server/overlay/index.test.ts Replaced manual log handling and expectPoll with createLogMatcher and expectLog
e2e/cases/server/overlay-type-errors/index.test.ts Simplified log assertions using expectLog instead of expectPoll
e2e/cases/plugin-api/plugin-transform-error-handle/index.test.ts Used built-in expectLog method from rsbuild instance

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

@chenjiahan chenjiahan merged commit 47c890e into main Aug 18, 2025
12 checks passed
@chenjiahan chenjiahan deleted the e2e_log_assertions_0818 branch August 18, 2025 10:46
@chenjiahan chenjiahan changed the title test(test): simplify runtime log assertions test(e2e): simplify runtime log assertions Aug 18, 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