Skip to content

Commit 51b474e

Browse files
authored
@testing-library__react: add debug options (DefinitelyTyped#42837)
* @testing-library__react: add debug options * Create package.json
1 parent 48275bf commit 51b474e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

types/testing-library__react/index.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
1010
// TypeScript Version: 3.0
1111

12+
import { OptionsReceived as PrettyFormatOptions } from 'pretty-format';
1213
import { queries, Queries, BoundFunction } from '@testing-library/dom';
1314
import { act as reactAct } from 'react-dom/test-utils';
1415

@@ -17,7 +18,11 @@ export * from '@testing-library/dom';
1718
export type RenderResult<Q extends Queries = typeof queries> = {
1819
container: HTMLElement;
1920
baseElement: HTMLElement;
20-
debug: (baseElement?: HTMLElement | DocumentFragment | Array<HTMLElement | DocumentFragment>) => void;
21+
debug: (
22+
baseElement?: HTMLElement | DocumentFragment | Array<HTMLElement | DocumentFragment>,
23+
maxLength?: number,
24+
options?: PrettyFormatOptions
25+
) => void;
2126
rerender: (ui: React.ReactElement) => void;
2227
unmount: () => boolean;
2328
asFragment: () => DocumentFragment;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"private": true,
3+
"dependencies": {
4+
"pretty-format": "^25.1.0"
5+
}
6+
}

0 commit comments

Comments
 (0)