-
Notifications
You must be signed in to change notification settings - Fork 638
styled-react: Fix browser tests not running #6822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
size-limit report 📦
|
There was a problem hiding this 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 fixes a configuration issue where browser tests for the styled-react package weren't running due to incorrect file pattern matching in the Vitest configuration. The fix ensures both .ts
and .mts
browser test configuration files are properly detected and executed.
- Updated the root Vitest config to include both
.ts
and.mts
browser configuration files - Added test names to distinguish between node and browser test environments
- Skipped a failing Select component test that was testing for an
sx
prop that was removed in May
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
vitest.config.mts | Added missing pattern for vitest.config.browser.ts files to ensure browser tests run |
packages/styled-react/vitest.config.ts | Added descriptive test name for node environment tests |
packages/styled-react/vitest.config.browser.ts | Added descriptive test name for browser environment tests |
packages/styled-react/tsconfig.json | Removed trailing empty line for formatting consistency |
packages/styled-react/src/tests/primer-react.browser.test.tsx | Skipped failing Select sx prop test since the feature was removed |
}) | ||
|
||
test('Select supports `sx` prop', () => { | ||
test.skip('Select supports `sx` prop', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skipping until we decide what to do with this, do we accept that sx should not be supported (not supported in this component since May) or do we bring it back?
Realised the browser tests weren't running 😅
Found a broken test because Select has not supported sx since May, there are no instances of it in github-ui, but there are a few in other apps
Rollout strategy
Testing & Reviewing
Merge checklist