This package, `preact-test-utils` version 0.1.4, served as an early compatibility layer for testing Preact components by allowing users to alias `react-addons-test-utils` in their build configuration (e.g., Webpack). Its primary goal was to enable existing React testing setups that relied on `react-addons-test-utils` to function with Preact without significant code changes. However, `react-addons-test-utils` itself was officially deprecated by React in version 15.5.0 (around 2017) and its functionalities were migrated to `react-dom/test-utils` and `react-test-renderer/shallow`. Consequently, `preact-test-utils` is now obsolete and effectively abandoned. Modern Preact testing relies on `@testing-library/preact` which wraps the official `preact/test-utils` module provided by the Preact core, offering a more robust and idiomatic approach to component testing.
npm install preact-test-utilsVerified import paths — ran on the pinned version, not inferred.
Demonstrates the required Webpack alias configuration for `preact-test-utils` and a conceptual test using the emulated `react-addons-test-utils` API. This approach is highly outdated.
Migrate your testing setup to `@testing-library/preact` which is the current recommended approach for testing Preact components. This library wraps `preact/test-utils` and provides a user-centric API.
Do not use this package. Adopt `@testing-library/preact` for all new and existing Preact component tests.
Understand that usage involves configuring a module alias. However, this is not a recommended solution for modern Preact development.
Ensure your Webpack configuration correctly aliases `react-addons-test-utils` to `preact-test-utils`. However, it is strongly advised to migrate to `@testing-library/preact` instead of troubleshooting this legacy setup.
This warning is inherent to using a deprecated API. The only real fix is to stop using `react-addons-test-utils` and by extension `preact-test-utils`, and instead adopt modern Preact testing solutions like `@testing-library/preact`.
No dependency data recorded yet.