Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Write tests for existing components #250

Open
seedy opened this issue Jan 19, 2022 · 1 comment
Open

[RFC] Write tests for existing components #250

seedy opened this issue Jan 19, 2022 · 1 comment
Assignees
Labels
kind/proposal prio This requires urgent handling

Comments

@seedy
Copy link
Contributor

seedy commented Jan 19, 2022

Goals

  • improve quality of components
  • secure PRs and review with tests
  • avoid regression

Background

What we know

  • testing components with @testing-library

What Radix-UI does

  • writes "integration" tests for each of its components (ex)
  • check accessibility violations with axe-jest

What's possible with Storybook

Storybook allows writing tests for stories instead of components.

Chromatic automates testing visual changes

https://www.chromatic.com/docs/

Proposals

  • Test components with testing-library
  • Add axe-jest to check for accessibility violations
  • Write integration tests for related components, when it makes sense
  • See if it's worth adding storybook integrations
@seedy
Copy link
Contributor Author

seedy commented Feb 15, 2022

  • We should test components not extending radix primitives
  • Testing accessibility is the most relevant part
  • Testing interactions with component
  • Avoid testing styles as it's redundant with stitches tests

@seedy seedy added the prio This requires urgent handling label Feb 21, 2022
@seedy seedy self-assigned this Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/proposal prio This requires urgent handling
Projects
None yet
Development

No branches or pull requests

4 participants