From 3ff941c0ac207c6d2660c85fdcc972dc41e7b3fb Mon Sep 17 00:00:00 2001 From: Tim Swalling Date: Mon, 23 Mar 2020 15:44:41 +0000 Subject: [PATCH] [testing-library__react] Update `cleanup` to return Promise As of testing-library/react-testing-library#519 `cleanup` is an async function. --- types/testing-library__react/index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/testing-library__react/index.d.ts b/types/testing-library__react/index.d.ts index fcea540f970cb5..9d438a0588c3f0 100644 --- a/types/testing-library__react/index.d.ts +++ b/types/testing-library__react/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @testing-library/react 9.1 +// Type definitions for @testing-library/react 10.0 // Project: https://github.com/testing-library/react-testing-library // Definitions by: Alex Krolick // Kent C Dodds @@ -6,6 +6,7 @@ // Weyert de Boer // Ifiok Jr. // Daniel Afonso +// Tim Swalling // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 @@ -47,7 +48,7 @@ export function render(ui: React.ReactElement, options: Rende /** * Unmounts React trees that were mounted with render. */ -export function cleanup(): void; +export function cleanup(): Promise; /** * Simply calls ReactDOMTestUtils.act(cb)