Skip to content

How to trick Svelte v5 mount() function into working? #12037

Closed Answered by webJose
webJose asked this question in Q&A
Discussion options

You must be logged in to vote

Guys, apologies for the lack of response. @wobsoriano is correct. However, if you have my situation and using @testing-library/svelte, then the way to go is use the plug-in provided by the library:

// vite.config.ts
import { svelteTesting } from '@testing-library/svelte/vite';

// And simply add it to the list of plug-ins.
    ...
    plugins: [sveltekit(), svelteTesting()],

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@wobsoriano
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by webJose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants