Test utilities for the noodl-ui component library, version 0.0.47. This package provides helpers for unit testing noodl-ui components, including mock providers, test renderers, and assertion utilities. It is part of the AITMED ecosystem and complements the main noodl-ui library. The package ships TypeScript declarations. As a pre-1.0.0 release, its API is unstable and may change. Alternatives include @testing-library/react for general React testing.
npm install noodl-test-utilsVerified import paths — ran on the pinned version, not inferred.
Renders a Button component from noodl-ui and simulates a click event using fireEvent.
Pin to exact version or use version ranges with caution.
Use import syntax instead of require.
Call mockProvider.cleanup() in your test teardown.
Ensure mockProvider is imported from 'noodl-test-utils' and wrapped around your component.
Make sure you are using render from noodl-test-utils, not from @testing-library/react.
Add a unique key prop to each list item in your rendered component.