-
Notifications
You must be signed in to change notification settings - Fork 78
chore(api-client): replace jsdom by happy-dom env #2172
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CodSpeed Performance ReportMerging #2172 will create unknown performance changesComparing Summary
Footnotes
|
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 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.
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