mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
@testing-library__react: add debug options (#42837)
* @testing-library__react: add debug options * Create package.json
This commit is contained in:
parent
48275bff65
commit
51b474ebde
7
types/testing-library__react/index.d.ts
vendored
7
types/testing-library__react/index.d.ts
vendored
@ -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<Q extends Queries = typeof queries> = {
|
||||
container: HTMLElement;
|
||||
baseElement: HTMLElement;
|
||||
debug: (baseElement?: HTMLElement | DocumentFragment | Array<HTMLElement | DocumentFragment>) => void;
|
||||
debug: (
|
||||
baseElement?: HTMLElement | DocumentFragment | Array<HTMLElement | DocumentFragment>,
|
||||
maxLength?: number,
|
||||
options?: PrettyFormatOptions
|
||||
) => void;
|
||||
rerender: (ui: React.ReactElement) => void;
|
||||
unmount: () => boolean;
|
||||
asFragment: () => DocumentFragment;
|
||||
|
||||
6
types/testing-library__react/package.json
Normal file
6
types/testing-library__react/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"pretty-format": "^25.1.0"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user