diff --git a/types/testing-library__react/index.d.ts b/types/testing-library__react/index.d.ts index 5ac83afed5..fcea540f97 100644 --- a/types/testing-library__react/index.d.ts +++ b/types/testing-library__react/index.d.ts @@ -9,6 +9,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 +import { OptionsReceived as PrettyFormatOptions } from 'pretty-format'; import { queries, Queries, BoundFunction } from '@testing-library/dom'; import { act as reactAct } from 'react-dom/test-utils'; @@ -17,7 +18,11 @@ export * from '@testing-library/dom'; export type RenderResult = { container: HTMLElement; baseElement: HTMLElement; - debug: (baseElement?: HTMLElement | DocumentFragment | Array) => void; + debug: ( + baseElement?: HTMLElement | DocumentFragment | Array, + maxLength?: number, + options?: PrettyFormatOptions + ) => void; rerender: (ui: React.ReactElement) => void; unmount: () => boolean; asFragment: () => DocumentFragment; diff --git a/types/testing-library__react/package.json b/types/testing-library__react/package.json new file mode 100644 index 0000000000..a019c58ee7 --- /dev/null +++ b/types/testing-library__react/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "pretty-format": "^25.1.0" + } +}