- Companion:
- class
Type members
Inherited types
Value members
Inherited methods
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
act {
// render components
}
// make assertions
This helps make your tests run closer to what real users would experience when using your application.
- Inherited from:
- ReactTestUtils2
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
await act(async () => {
// render components
});
// make assertions
This helps make your tests run closer to what real users would experience when using your application.
- Inherited from:
- ReactTestUtils2
Turn <div data-reactroot="">hello</div>
into <div>hello</div>
Turn <div data-reactroot="">hello</div>
into <div>hello</div>
- Inherited from:
- ReactTestUtils2
Concrete fields
Inherited fields
Implicits
Inherited implicits
- Inherited from:
- ReactTestUtilExtensions
- Inherited from:
- ReactTestUtilExtensions1