From 465a031f8c8e3dc54913f3eae9fb69205ac93307 Mon Sep 17 00:00:00 2001 From: Jeff Payan Date: Thu, 10 Oct 2019 10:02:18 -0700 Subject: [PATCH] Update type of act to support async act --- typings/index.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 7525a80..1442ca7 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1,4 +1,5 @@ import { ReactElement, ComponentType } from 'react'; +import { act as reactAct } from 'react-test-renderer'; import * as queries from './queries'; import * as queryHelpers from './query-helpers'; @@ -49,7 +50,9 @@ export function render( export const cleanup: () => void; -export const act: (callback: () => void) => void; +export const act: typeof reactAct extends undefined + ? (callback: () => void) => void + : typeof reactAct; export { queries, queryHelpers, within }; export * from './to-json';