Skip to content
A tool to call `act()` implicitly without writing it on tests.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.md
README.md
index.js
jest.config.js Initial commit Mar 3, 2019
package.json
prettier.config.js
story.md

README.md

React Act

A way to avoid calling act() when testing React hooks.

Installation

npm i react-act

Usage

import 'react-act'

// write your tests without having to call `act()`

Important note

This library is a temporary workaround while waiting for atc() to support async actions. Its implementation forces changes to be synchronous, which is not how React behave on browser.

How? and Why?

Check this article to know why and how did I create this.

Contributing

Feel free to open issues or submit Pull requests :D

You can’t perform that action at this time.