Popularity
0.4
Growing
Activity
5.8
Growing
30
2
1

Description

Custom React Hooks are very hard to test. There are a few articles dedicated to this, but they all come down to the same solution: instantiating a fake component that is using the hook, and testing that the hook is working through that component.

The premise of this testing library is that this is slow, hard to setup, and fails when you use useEffect in an asynchronous manner.

So the solution to that, that this library brings, is to completely mock the React Hooks API, and replace it by fake implementations (that you control).

That way you can test your hooks in isolation, and you don't need the overhead of instanciating React Components and a DOM just to test a small function.

Monthly Downloads: 0
Programming language: TypeScript
Tags: Dev Tools     React     Testing     Jest     Unit-test     Hooks     React Hooks    

Jooks (Jest ❤ + Hooks 🤘🏻) alternatives and similar libraries

Based on the "Dev Tools" category

Do you think we are missing an alternative of Jooks (Jest ❤ + Hooks 🤘🏻) or a related project?

Add another 'Dev Tools' Library