mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[testing-library__react] Update cleanup to return Promise (#43322)
As of testing-library/react-testing-library#519 `cleanup` is an async function.
This commit is contained in:
parent
68783aa55b
commit
d1581b6eeb
5
types/testing-library__react/index.d.ts
vendored
5
types/testing-library__react/index.d.ts
vendored
@ -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 <https://github.com/alexkrolick>
|
||||
// Kent C Dodds <https://github.com/kentcdodds>
|
||||
@ -6,6 +6,7 @@
|
||||
// Weyert de Boer <https://github.com/weyert>
|
||||
// Ifiok Jr. <https://github.com/ifiokjr>
|
||||
// Daniel Afonso <https://github.com/danieljcafonso>
|
||||
// Tim Swalling <https://github.com/timswalling>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
@ -47,7 +48,7 @@ export function render<Q extends Queries>(ui: React.ReactElement, options: Rende
|
||||
/**
|
||||
* Unmounts React trees that were mounted with render.
|
||||
*/
|
||||
export function cleanup(): void;
|
||||
export function cleanup(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Simply calls ReactDOMTestUtils.act(cb)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user