Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

[Backport] fix(react): fix jsdom react testing issues #6636

Closed
wants to merge 0 commits into from

Conversation

ashleyryan
Copy link

Fixes #5985

  • Add isNode check to property syncing in cdscontrol to prevent error

Fixes #6525:

Signed-off-by: Ashley Ryan [email protected]

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • If applicable, have a visual design approval

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • clarity.design website / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue #5985
When rendering CdsSelect in jsdom (via react-testing-library), an exception will be thrown on render and all tests will fail.

Issue #6525
The aria-reflect polyfill doesn't run in node because of jsdom exceptions, meaning react unit tests can't target elements by role

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

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

Successfully merging this pull request may close these issues.

1 participant