Skip to content

Conversation

@mkucmus
Copy link
Contributor

@mkucmus mkucmus commented Dec 11, 2025

Description

change an env from jsdom to happy-dom - also snapshot was simplified

fixes failing vitest https://github.com/shopware/frontends/actions/runs/20126976719/job/57758787679

Type of change

ToDo's

Screenshots (if applicable)

Additional context

@vercel
Copy link

vercel bot commented Dec 11, 2025

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

Project Deployment Preview Updated (UTC)
frontends-demo Ready Ready Preview Dec 11, 2025 10:31am
frontends-vue-starter-template Ready Ready Preview Dec 11, 2025 10:31am
shopware-frontends-docs Ready Ready Preview Dec 11, 2025 10:31am

@mkucmus mkucmus requested a review from patzick December 11, 2025 08:47
@mkucmus mkucmus closed this Dec 11, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 11, 2025

CodSpeed Performance Report

Merging #2172 will create unknown performance changes

Comparing chore/ofetch-upgrade (3c74526) with main (79a1f54)1

Summary

⚠️ No benchmarks were detected in both the base of the PR and the PR.
Please ensure that your benchmarks are correctly instrumented with CodSpeed.

Check out the benchmarks creation guide

⏩ 8 skipped2

Footnotes

  1. No successful run was found on main (926aa11) during the generation of this report, so 79a1f54 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mkucmus mkucmus changed the title chore: upgrade ofetch to 1.5.1 chore: replace jsdom by happy-dom env Dec 11, 2025
@mkucmus mkucmus changed the title chore: replace jsdom by happy-dom env chore(api-client): replace jsdom by happy-dom env Dec 11, 2025
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 replaces jsdom with happy-dom as the test environment for the api-client package to fix failing vitest tests. The change involves updating dependencies, test configurations, and test assertions to account for differences between the two DOM implementations.

Key Changes:

  • Replaced jsdom with happy-dom v20.0.11 in devDependencies
  • Added global environment configuration in vitest.config.ts
  • Updated test assertions to match happy-dom's behavior (error messages, user-agent strings)

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/api-client/package.json Replaced jsdom dependency with happy-dom
packages/api-client/vitest.config.ts Added happy-dom as the test environment
packages/api-client/src/createApiClient.test.ts Updated environment directive, adjusted assertions for happy-dom compatibility
packages/api-client/src/createAdminApiClient.test.ts Updated abort error message assertion
pnpm-lock.yaml Updated lockfile with happy-dom dependencies, removed jsdom

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@patzick patzick merged commit 6c75bc5 into main Dec 11, 2025
11 of 12 checks passed
@patzick patzick deleted the chore/ofetch-upgrade branch December 11, 2025 12:37
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.

3 participants