Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: experimental-ct-svelte Svelte 5 support - svelte/internal won't be available #30278

Open
siliconcat opened this issue Apr 7, 2024 · 1 comment

Comments

@siliconcat
Copy link

馃殌 Feature Request

I was trying to run some component tests with a Svelte 5 development version. However I see that Svelte 5 has removed the svelte/internal package that is used in the experimental-ct-svelte module. It is "internal" and not for public use, so the risk was there.

import { detach as __pwDetach, insert as __pwInsert, noop as __pwNoop } from 'svelte/internal';

This then throws the error:

RollupError: "noop" is not exported by "../../node_modules/.pnpm/svelte@5.0.0-next.95/node_modules/svelte/src/internal/index.js", imported by "playwright/index.ts".

when trying to run the component test.

I understand that Svelte 5 is not there yet, and the component tests are a experimental feature, so the priorities are pretty low. I am happy to help if pointed to the right direction, but sadly I don't have enough understanding on how to address this or if there is any workaround.

Thanks!

Example

No response

Motivation

Svelte 5 will be out there one day and Playwright will make it greater with the component tests.

@sand4rt
Copy link
Collaborator

sand4rt commented Apr 27, 2024

The svelte/internal module is used for testing slots, but it appears that slots are replaced by snippets/render tags in Svelte 5. There are more breaking changes: https://svelte-5-preview.vercel.app/docs/breaking-changes so i think this will require a new @playwright/experimental-ct package unfortunately. Rich also mentions this in his presentation: https://www.youtube.com/live/gkJ09joGBZ4?si=zXhDBYYj9cYteOOF&t=8547 on Svelte Summit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants