Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Updates type annotations and mock contexts to fix all type issues in unit test cases.

Checklist

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

Copilot AI review requested due to automatic review settings May 31, 2025 13:42
@netlify
Copy link

netlify bot commented May 31, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 4743692
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/683b072ee0affb0008cbb9cc
😎 Deploy Preview https://deploy-preview-5340--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: 74 (🟢 up 6 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (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 addresses type issues in unit tests by updating type annotations and refining test contexts.

  • Updated tsconfig.json to include additional type definitions.
  • Updated resolve and html tests to use more explicit type casts and context stubs.
  • Refined helper and CSS tests to resolve type conflicts and ensure proper PostCSS configuration handling.

Reviewed Changes

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

Show a summary per file
File Description
packages/core/tests/tsconfig.json Included additional type file to support type definitions in tests.
packages/core/tests/resolve.test.ts Added an explicit type cast for resolve.alias to suppress type warnings.
packages/core/tests/html.test.ts Passed a stub context to pluginHtml to satisfy updated type annotations.
packages/core/tests/helpers.test.ts Updated import path and cast for InternalContext to resolve type conflicts.
packages/core/tests/define.test.ts Removed an unused test parameter for cleaner test signature.
packages/core/tests/css.test.ts Added type checks for PostCSS config to ensure plugins are set only when options are objects.

@chenjiahan chenjiahan merged commit 260ffb2 into main Jun 1, 2025
12 checks passed
@chenjiahan chenjiahan deleted the ut_types_0531 branch June 1, 2025 00:28
@chenjiahan chenjiahan mentioned this pull request Jun 2, 2025
@chenjiahan chenjiahan mentioned this pull request Jun 26, 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