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

[@emotion/jest] Pass through includeStyles option in createEnzymeSerializer #2715

Merged
merged 3 commits into from
Apr 7, 2022

Conversation

thompsongl
Copy link
Contributor

@thompsongl thompsongl commented Apr 7, 2022

What: Add the missing includeStyles option to createEnzymeSerializer

Why: The option was added to createSerializer in #2709, but was not added to createEnzymeSerializer

How: The option is accepted and passed through to createEmotionSerializer

  • Documentation N/A
  • Tests N/A
  • Code complete
  • Changeset

@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2022

🦋 Changeset detected

Latest commit: a3250b0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@emotion/jest Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 7, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a3250b0:

Sandbox Source
Emotion Configuration

@codecov
Copy link

codecov bot commented Apr 7, 2022

Codecov Report

Merging #2715 (d83e3fe) into main (fc52bed) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head d83e3fe differs from pull request most recent head a3250b0. Consider uploading reports for the commit a3250b0 to get more accurate results

Impacted Files Coverage Δ
packages/jest/src/create-enzyme-serializer.js 97.43% <100.00%> (+0.06%) ⬆️

@@ -66,11 +66,13 @@ const wrappedEnzymeSerializer = {

export function createEnzymeSerializer({
classNameReplacer,
DOMElements = true
DOMElements = true,
includeStyles = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might also need to add this in the .d.ts file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createEnzymeSerializer uses the same CreateSerializerOptions interface as createSerializer (updated with includeStyles in #2709). In enzyme.d.ts, imported from index.d.ts. Or are you referring to a different d.ts file?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is fine. I was reviewing from mobile and I've assumed that there is another type for this one.

@Andarist Andarist merged commit 3743483 into emotion-js:main Apr 7, 2022
@github-actions github-actions bot mentioned this pull request Apr 7, 2022
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.

2 participants