Skip to content

Commit

Permalink
Fix test by using async act
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii committed Mar 9, 2021
1 parent 19f6bc7 commit 039b0bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fixtures/dom/src/__tests__/wrong-act-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ it("doesn't warn when you use the right act + renderer: test", () => {
});
});

it('resets correctly across renderers', () => {
it('resets correctly across renderers', async () => {
function Effecty() {
React.useEffect(() => {}, []);
return null;
}
TestUtils.act(() => {
await TestUtils.act(async () => {
TestRenderer.act(() => {});
expect(() => {
TestRenderer.create(<Effecty />);
Expand Down

0 comments on commit 039b0bf

Please sign in to comment.