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 vitest:
Then you can start writing tests and run them with vitest!
💡 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.
See our examples for more usage.
Re-exports QueryByBoundAttribute
Re-exports QueryByRole
Re-exports QueryByText
Re-exports QueryMethod
Re-exports SelectorMatcherOptions
Re-exports WithSuggest
Namespace | Description |
---|---|
queries | - |
queryHelpers | - |
Class | Description |
---|---|
LynxTestingEnv | A pure-JavaScript implementation of the Lynx Spec, notably the Element PAPI and Dual-threaded Model for use with Node.js. |
Interface | Description |
---|---|
ByRoleOptions | - |
Config | - |
ConfigFn | - |
DefaultNormalizerOptions | - |
LogRolesOptions | - |
MatcherOptions | - |
NormalizerOptions | - |
PrettyDOMOptions | - |
Queries | - |
QueryOptions | - |
RenderHookOptions | The options for renderHook |
RenderHookResult | The result of renderHook |
RenderOptions | The options for render. |
Suggestion | - |
waitForOptions | - |
Variable | Description |
---|---|
prettyFormat | - |
screen | - |