Skip to content

svelte5: "TypeError: act is not a function" on 4.2.2 #342

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

Closed
sureshjoshi opened this issue Mar 26, 2024 · 3 comments
Closed

svelte5: "TypeError: act is not a function" on 4.2.2 #342

sureshjoshi opened this issue Mar 26, 2024 · 3 comments

Comments

@sureshjoshi
Copy link

sureshjoshi commented Mar 26, 2024

Hi!

Just tried out 4.2.2 with Svelte 5 and I am getting a "TypeError: act is not a function".

I believe the corresponding code is this:

import { act, cleanup } from './svelte5.js'

Because svelte5.js exports render and cleanup, not act.

Locally, I've imported act from pure.js, but I don't know if that's the intention (otherwise I would have PR'd instead of just opening a ticket).

import { act } from "./pure.js"
import { cleanup } from './svelte5.js'
@mcous
Copy link
Collaborator

mcous commented Apr 2, 2024

Intention is to be able to replace @testing-library/svelte with @testing-library/svelte/svelte5. That import line is certainly incorrect

I've opened #346 to fix the issue

@mcous
Copy link
Collaborator

mcous commented Apr 18, 2024

@yanick we're good to close this one out, too! I must've forgotten to add the ticket number to the commit message or something

@yanick
Copy link
Collaborator

yanick commented Apr 18, 2024

Gotcha. And out it goes!

@yanick yanick closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants