Skip to content

Commit

Permalink
[testing-library__react] Update cleanup to return Promise
Browse files Browse the repository at this point in the history
As of testing-library/react-testing-library#519 `cleanup` is an
async function.
  • Loading branch information
timswalling committed Mar 23, 2020
1 parent 31dadd4 commit 3ff941c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions types/testing-library__react/index.d.ts
@@ -1,11 +1,12 @@
// 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>
// Sebastian Silbermann <https://github.com/eps1lon>
// 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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3ff941c

Please sign in to comment.