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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with preact/compat #14

Merged
merged 3 commits into from Mar 22, 2019
Merged

Conversation

robertknight
Copy link
Member

Make the adapter a better drop-in replacement for the enzyme-adapter-react-* packages by:

  • Making the adapter class the default export of the package
  • Fixing an issue with apps or libraries using preact/compat rather than preact directly

This check breaks if the application is using preact/compat, in which
case VNodes created by the app will reference the `Component` class from
the preact/compat bundle instead of the preact bundle.
When the export name was changed to `Adapter` the intent was to make it
a drop-in replacement for the "enzyme-adapter-react-*" packages. However
those packages export the adapter as a _default_ export, which is
typically named `Adapter` by the consumer.
@robertknight robertknight merged commit 6cf25a9 into master Mar 22, 2019
@robertknight robertknight deleted the preact-compat-fixes branch March 22, 2019 01:05
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

Successfully merging this pull request may close these issues.

None yet

1 participant