@lynx-js/react/testing-library
ReactLynx Testing Library is a simple and complete ReactLynx unit testing library that encourages good testing practices.
Inspired completely by react-testing-library
Similar to react-testing-library, this library is designed to test your ReactLynx components in the same way you would test React components using react-testing-library.
Setup
Setup vitest:
Then you can start writing tests and run them with vitest!
Usage
💡 Since our testing environment (@lynx-js/testing-environment) is based on jsdom, You may also be interested in installing @testing-library/jest-dom so you can use
the custom jest matchers.
Examples
See our examples for more usage.
Credits
- Testing Library for the testing utilities and good practices for React testing.
References
QueryByBoundAttribute
Re-exports QueryByBoundAttribute
QueryByRole
Re-exports QueryByRole
QueryByText
Re-exports QueryByText
QueryMethod
Re-exports QueryMethod
SelectorMatcherOptions
Re-exports SelectorMatcherOptions
WithSuggest
Re-exports WithSuggest