Skip to content

chore(jest): toHaveShadowPart custom matcher - #28610

Merged
sean-perkins merged 1 commit into
FW-5614from
sp/FW-5614
Nov 30, 2023
Merged

chore(jest): toHaveShadowPart custom matcher#28610
sean-perkins merged 1 commit into
FW-5614from
sp/FW-5614

Conversation

@sean-perkins

Copy link
Copy Markdown
Contributor

Issue number: N/A


What is the current behavior?

What is the new behavior?

  • Adds a custom matcher to the jest configuration for Stencil to enable using expect(el).toHaveShadowPart('partName')

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions Bot added the package: core @ionic/core package label Nov 30, 2023
@sean-perkins

Copy link
Copy Markdown
Contributor Author

Let me know if you think this approach is worth pursuing/merging. I think custom matchers could help reduce some of the test boilerplate required for these common scenarios.

@sean-perkins
sean-perkins marked this pull request as ready for review November 30, 2023 04:03
@sean-perkins
sean-perkins requested a review from a team as a code owner November 30, 2023 04:03
@sean-perkins
sean-perkins requested review from brandyscarney and liamdebeasi and removed request for a team and brandyscarney November 30, 2023 04:03

@liamdebeasi liamdebeasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

@sean-perkins
sean-perkins merged commit 3c08b04 into FW-5614 Nov 30, 2023
@sean-perkins
sean-perkins deleted the sp/FW-5614 branch November 30, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants