Skip to content

Commit 3ff941c

Browse files
committed
[testing-library__react] Update cleanup to return Promise
As of testing-library/react-testing-library#519 `cleanup` is an async function.
1 parent 31dadd4 commit 3ff941c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

types/testing-library__react/index.d.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// Type definitions for @testing-library/react 9.1
1+
// Type definitions for @testing-library/react 10.0
22
// Project: https://github.com/testing-library/react-testing-library
33
// Definitions by: Alex Krolick <https://github.com/alexkrolick>
44
// Kent C Dodds <https://github.com/kentcdodds>
55
// Sebastian Silbermann <https://github.com/eps1lon>
66
// Weyert de Boer <https://github.com/weyert>
77
// Ifiok Jr. <https://github.com/ifiokjr>
88
// Daniel Afonso <https://github.com/danieljcafonso>
9+
// Tim Swalling <https://github.com/timswalling>
910
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
1011
// TypeScript Version: 3.0
1112

@@ -47,7 +48,7 @@ export function render<Q extends Queries>(ui: React.ReactElement, options: Rende
4748
/**
4849
* Unmounts React trees that were mounted with render.
4950
*/
50-
export function cleanup(): void;
51+
export function cleanup(): Promise<void>;
5152

5253
/**
5354
* Simply calls ReactDOMTestUtils.act(cb)

0 commit comments

Comments
 (0)