Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Update type of act to support async act #65

Merged
merged 1 commit into from
Oct 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -49,7 +50,9 @@ export function render<Q extends Queries>(

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';
Expand Down