-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
docs: document Vitest SSR environment requirement for Astro 6 #12808
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
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
|
@delucis |
|
Just resolved the conflicts here, and noting that it looks like we're waiting on movement on the implementation PR which is marked as |
florian-lefebvre
left a comment
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.
Thanks for sending a PR! A few suggestions
| }); | ||
| ``` | ||
|
|
||
| If you need to test both Astro components and browser-specific code, use Vitest's workspace configuration to separate them: |
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.
Workspaces are deprecated, can you update this sentence and the codeblock below to show usage with projects? https://vitest.dev/guide/projects
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.
@Ntale3 Just making sure you see this comment from Florian! Once this example is updated, I think this PR (and the other Astro changeset one) will be ready to merge! 🥳
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
|
Just a note that I have:
Looks like what's needed here in order to merge:
|
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
|
Update: We are merging this because there is going to be a release with the merged code so we need something published in the upgrade guide! If someone wants to improve this entry at a later date, then they can do so in another PR to the v6 branch! But we at least need something published now. 😄 |
|
@sarah11918 am so sorry for the delay i wasnt online at that time. |
Description (required)
This PR documents a breaking change in Astro 6 where rendering
.astrocomponents in Vitest tests now requires using an SSR environment (node) instead of client environments (jsdom/happy-dom).The temporary workaround added in Astro 5.x has been removed to ensure tests run in an environment that matches Astro's SSR build process.
What's included:
nodeenvironment need no changesRelated issues & labels (optional)
For Astro version:
6.0. See astro PR #15049.