Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

Per comment #3563015047, migrated all component tests to use vitest browser mode's destructuring pattern instead of the global screen object.

Changes

  • skeleton-svelte (25 files): Updated imports from vitest-browser-svelte, removed screen usage
  • skeleton-react (25 files): Replaced @testing-library/react with vitest-browser-react, removed screen usage
  • All tests now destructure query methods directly from render() return value

Example

Before:

import { render, screen } from '@testing-library/react';

it('renders', () => {
  render(<Test />);
  expect(screen.getByTestId('root')).toBeInTheDocument();
});

After:

import { render } from 'vitest-browser-react';

it('renders', () => {
  const { getByTestId } = render(<Test />);
  expect(getByTestId('root')).toBeInTheDocument();
});

Fixes

  • Corrected pagination test using wrong test ID (first-triggerlast-trigger)
  • Fixed import spacing in tabs, slider, and segmented-control tests

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@changeset-bot
Copy link

changeset-bot bot commented Nov 21, 2025

⚠️ No Changeset found

Latest commit: c801b04

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Nov 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
www.skeleton.dev Error Error Nov 21, 2025 1:47pm

Copilot AI changed the title [WIP] Remove all uses of @/ path aliases in packages Migrate tests from Testing Library to vitest browser mode destructuring Nov 21, 2025
Copilot AI requested a review from Hugos68 November 21, 2025 13:37
Copilot finished work on behalf of Hugos68 November 21, 2025 13:37
@Hugos68 Hugos68 marked this pull request as ready for review November 21, 2025 13:46
@Hugos68 Hugos68 merged commit a4e654d into perf/monorepo Nov 21, 2025
1 check was pending
@Hugos68 Hugos68 deleted the copilot/sub-pr-4135 branch November 21, 2025 13:46
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