fix(test): suppress vite swc and jsdom scrollTo warnings#1884
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces test/build noise by switching the React Vite plugin from the SWC variant to the standard plugin (since no SWC-specific configuration is used), and by stubbing window.scrollTo in the Vitest JSDOM environment to silence the “Not implemented” warning.
Changes:
- Replace
@vitejs/plugin-react-swcwith@vitejs/plugin-reactin Vite/Vitest configs. - Stub
window.scrollToinvitest.setup.tsto suppress JSDOM “Not implemented” output. - Update dependencies/lockfile accordingly (removing
@swc/corepackages).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.setup.ts | Adds a window.scrollTo stub alongside existing JSDOM stubs to silence warnings during tests. |
| vitest.config.ts | Switches Vitest’s Vite plugin from plugin-react-swc to plugin-react. |
| renderer/vite.renderer.config.ts | Switches renderer Vite config from plugin-react-swc to plugin-react. |
| package.json | Replaces the devDependency on @vitejs/plugin-react-swc with @vitejs/plugin-react. |
| pnpm-lock.yaml | Lockfile updates reflecting the plugin swap and removal of SWC-related packages. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
peppescg
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
@vitejs/plugin-react-swcwith@vitejs/plugin-reactinvitest.config.tsandrenderer/vite.renderer.config.ts. No SWC plugins were configured, so Vite/Rolldown recommends using the lighter plugin.window.scrollToinvitest.setup.tsalongside the existing jsdom stubs (scrollIntoView,hasPointerCapture, etc.) to silence the "Not implemented: Window's scrollTo() method" noise in test output.