-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat: add Svelte v5-next support #321
Conversation
Is there any consumer emulation as part of the CI flow?
...but running a simple component test still fails to render 😞 I had hoped for more success seeing all the jsdom checks passing here, but I'm still seeing the same error as the latest release:
|
It'll soon be in a |
@RobinKnipe that smells like a dependency install issue, you might want to check if you have duplicate versions installed with Like @yanick said, you'll probably have a happier time if you wait for the prerelease version in npm. I've never messed around with installing this library via git so I don't really know what pitfalls and limitations exist, especially coming if it's coming from a fork rather than upstream If you're curious what our CI does, check out release.yml in the workflows folder; it's fairly straightforward. |
If it helps; some partial success in this test project. Noddy unit tests created for the 2 components from the default "create svelte" setup (one working, one failing). This is using the changes in this PR: svelte5$ npm why @testing-library/svelte
@testing-library/[email protected] dev
node_modules/@testing-library/svelte
dev @testing-library/svelte@"git+ssh://github.com/mcous/svelte-testing-library#150335aac28f071710ca5771d4dc2a4f7363633c" from the root project |
@RobinKnipe your example repo has three problems, all interacting/hiding each other, that are causing that
Since these are not issues with this library nor Svelte v5, if you have any additional questions, please open a separate discussion if you need help testing a SvelteKit app |
Basing on 'next', and I'm going to push the conflict resolutions in 2 minutes. |
@mcous You good with me merging this bad boy into next and seeing if it triggers our first next-type release to npm? |
@yanick oh boy 😬, no time like the present The only thing giving me pause is that our Not sure what your desires are on |
Oh yeah, you're right.
Hmmm, it's true that with the test suite, the chances that we'll utterly bugger up everything are slim (and yes, I just jinxed us by saying that). But today is a beautiful day to di-- I mean, deploy, so let's Leeroy Jenkins this puppy out and see what happens. >.> |
🎉 This PR is included in version 4.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@mcous ah it's SvelteKit related!? Ok, I'll try and refine my testing to Svelte only examples. Thanks! |
Overview
This PR is an alternative approach to #284 (CC @yanick) that adds experimental support for
svelte@next
without breaking support for Svelte v3 nor v4. I think adding support for the prerelease version of Svelte v5 as soon as possible will be a really helpful move for everyone trying to migrate - myself very much included.This PR requires the cleanup work I did in #314. Please see https://github.com/mcous/svelte-testing-library/pull/1 in my fork for the incremental diff from #314 to here. This PR is ready for review, but #314 should merge first
Issues encountered
onMount
andonDestroy
are attached and called asynchronouslyonMount
noronDestroy
will be calledact()
s to get passing againanchor
option has been removedElement.animate
is required to run transitionshappy-dom
is pretty broken, probably a Svelte issuehappy-dom
test fails with >2 components in a file sveltejs/svelte#10358Work after this PR
onMount
andonDestroy
are called, we'll need to makerender
async so it can calltick()
after render, which will be a breaking change