Skip to content

Check the default property of Component for the constructor #34

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

Merged
merged 1 commit into from
Jun 10, 2019

Conversation

pngwn
Copy link

@pngwn pngwn commented Jun 10, 2019

This change checks the default property of the Component argument in render to prevent problems mounting components due to the way that Svelte handles the presence of both named and default imports when compiling to cjs.

In order to test this I added another jest transform targetting .html files instead of .svelte files and used a jest transform that uses svelte.compile directly and compiles to cjs. An example App.html and a test rendering this file was also added.

Fixes #32.

@benmonro
Copy link
Member

@allcontributorsbot please add @pngwn for code, tests

@allcontributors
Copy link
Contributor

@benmonro

I've put up a pull request to add @pngwn! 🎉

@benmonro benmonro merged commit a8dbf45 into testing-library:master Jun 10, 2019
@benmonro
Copy link
Member

🎉 This PR is included in version 1.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

render function isn't checking the default property for the constructor
2 participants