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

Introduce tests for React components #13932

Open
MasonM opened this issue Nov 23, 2024 · 2 comments
Open

Introduce tests for React components #13932

MasonM opened this issue Nov 23, 2024 · 2 comments
Labels
type/feature Feature request

Comments

@MasonM
Copy link
Contributor

MasonM commented Nov 23, 2024

Summary

There are currently no tests for any of the React components under ui/. There are a few Jest tests for non-React functions, but testing components is not feasible with Jest without adding additional libraries. This makes it difficult to work with the UI due to the risk of regressions.

I recommend adding React testing library. It's lightweight, very popular, and recommended by Jest.

Use Cases

Adding tests for complex components (e.g. ObjectEditor) to catch regressions, e.g. #13931

@MasonM
Copy link
Contributor Author

MasonM commented Nov 25, 2024

@isubasinghe Could you explain why you closed this?

@isubasinghe isubasinghe reopened this Nov 25, 2024
@isubasinghe
Copy link
Member

Apologies, this was an accident.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Feature request
Projects
None yet
Development

No branches or pull requests

2 participants