-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Type] Automated TestingTesting infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take
Description
Previously: https://github.com/WordPress/gutenberg/pull/6527/files#r185974677
We currently skip tests which rely on React.forwardRef because they are not supported yet by Enzyme:
gutenberg/components/button/test/index.js
Lines 106 to 118 in 400f8fc
| // Disable reason: This test is desirable, but unsupported by Enzyme in | |
| // the current version, as it depends on features new to React in 16.3.0. | |
| // | |
| // eslint-disable-next-line jest/no-disabled-tests | |
| describe.skip( 'ref forwarding', () => { | |
| it( 'should enable access to DOM element', () => { | |
| const ref = createRef(); | |
| mount( <ButtonWithForwardedRef ref={ ref } /> ); | |
| expect( ref.current.nodeName ).toBe( 'button' ); | |
| } ); | |
| } ); |
This is tracked by the Enzyme project at enzymejs/enzyme#1604
Once the above issue is closed and Enzyme produces a new release introducing support for React.forwardRef, we should remove the workarounds introduced by #6527 .
Open questions:
- What else do we use from React 16.3 that isn't supported by Enzyme that will need to be updated?
- What components other than
Buttonhave tests which need to be updated?
gziolo
Metadata
Metadata
Assignees
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Type] Automated TestingTesting infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take