-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
MockComponentLatest.js is very outdated and doesn't work on recent version of svelte #56
Comments
@cibernox I'm publishing version Also, I had a question about the two lines here:
I actually had to remove them to fix failing test cases so I was wondering if your issue is still fixed without them. |
@kobejean Sadly, those two lines are precisely the lines that fix the issue I am facing. The reason why those lines are needed is because starting in 3.40, svelte initializes components differently. This is the diff between 3.39 and 3.40: sveltejs/svelte@v3.39.0...v3.40.0#diff-da9bae4e28c441de5ba3a074e30775fe69109100b3d921ad8f2592d93cd67b7f On my tests apparently I have a mock component that is the parent of another mock component. So when the child component tries to access |
Also, seems that the test case that is failing without those lines is invoked some mocked component using |
@cibernox Ok hmm, thats good to know. I am able to add Dynamic instantiation of a mocked component: Mocked parent with mocked slotted child: And if you could write a test case that covers your issue that would be great. To run tests on your machine, run:
|
I've noticed at least several issues, like
cannot read $$ of undefined
orcannot read context of undefined
and with the missingappend_styles
arguments (https://github.com/sveltejs/svelte/blob/dbbac2837e987ab3cf76ea901e4956c057919a96/src/runtime/internal/Component.ts#L107)Maybe this file can be updated to support 3.40+
The text was updated successfully, but these errors were encountered: