Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Standardize file content assertions using helper functions for better error messages and consistency.

Related Links

#6248

Checklist

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

Copilot AI review requested due to automatic review settings September 25, 2025 05:12
@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 7e4b6b0
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68d4d391df6f520008f537b6
😎 Deploy Preview https://deploy-preview-6249--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: 81 (🟢 up 29 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 standardizes file content assertions in e2e tests by replacing manual file finding patterns with helper functions findFile and getFileContent for better error messages and consistency.

  • Introduces helper functions for consistent file finding and content retrieval
  • Updates HASH_PATTERN regex to match 8+ character hashes instead of 6+
  • Improves error messages with colored output for better debugging

Reviewed Changes

Copilot reviewed 91 out of 91 changed files in this pull request and generated 3 comments.

File Description
e2e/helper/utils.ts Updates HASH_PATTERN regex and improves error message formatting with colors
e2e/cases/*/index.test.ts Standardizes file content assertions by replacing manual Object.keys(files).find() patterns with findFile and getFileContent helper functions
e2e/cases/polyfill/helper.ts Refactors polyfill content retrieval to use helper functions with proper function matchers

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

@chenjiahan chenjiahan merged commit 85f156d into main Sep 25, 2025
11 checks passed
@chenjiahan chenjiahan deleted the filename_helper_part_2_0925 branch September 25, 2025 05:41
@chenjiahan chenjiahan mentioned this pull request Sep 29, 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