preact/test-utils package provides utilities to help test Preact components in a test environment.
Installation
Importing
Available utilities
The test-utils package exports three main functions:setupRerender
Set up synchronous rendering for tests
act
Flush effects and renders in tests
teardown
Clean up test environment