From 039b0bfc6bc9ad115d8f744f1953565d43697efe Mon Sep 17 00:00:00 2001 From: Rick Hanlon Date: Mon, 8 Mar 2021 21:33:55 -0700 Subject: [PATCH] Fix test by using async act --- fixtures/dom/src/__tests__/wrong-act-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fixtures/dom/src/__tests__/wrong-act-test.js b/fixtures/dom/src/__tests__/wrong-act-test.js index 3e8912276e17c..a3fe716ff07c8 100644 --- a/fixtures/dom/src/__tests__/wrong-act-test.js +++ b/fixtures/dom/src/__tests__/wrong-act-test.js @@ -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();