Skip to content

EuiCode & EuiCodeBlock Jest compatibility #2842

@thompsongl

Description

@thompsongl

As of #2820 (v19.0.0) EuiCode and EuiCodeBlock use a React portal to render content. In Kibana, this causes failures in several snapshot tests, giving:

Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.

Initial thought: we may want to provide a .testenv. mock to bypass createPortal.

Metadata

Metadata

Assignees

Labels

testingIssues or PRs that only affect tests - will not need changelog entries

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions