Skip to content

Add instructions to test React apps built with primer/react #2836

Description

@Zenulous

Recently I've been working on a project that utilizes this component library. We use jest and react-test-renderer to create tests for our frontend. There are issues when running the tests due to CSS definitions:
image

Solutions for this include importing helpers like https://github.com/primer/react/blob/main/src/utils/test-helpers.tsx, and I think it can be valuable to refer to this in documentation as it took me quite some time to figure out how to properly mock CSS.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions