File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 0.0.0-semantically-released" ,
4
4
"description" : " Simple and complete React DOM testing utilities that encourage good testing practices." ,
5
5
"main" : " dist/index.js" ,
6
+ "typings" : " typings/index.d.ts" ,
6
7
"engines" : {
7
8
"node" : " >=8" ,
8
9
"npm" : " >=5"
25
26
"license" : " MIT" ,
26
27
"dependencies" : {},
27
28
"devDependencies" : {
29
+ "@types/react-dom" : " ^16.0.4" ,
28
30
"axios" : " ^0.18.0" ,
29
31
"history" : " ^4.7.2" ,
30
32
"kcd-scripts" : " ^0.36.1" ,
58
60
"url" : " https://github.com/kentcdodds/react-testing-library/issues"
59
61
},
60
62
"homepage" : " https://github.com/kentcdodds/react-testing-library#readme"
61
- }
63
+ }
Original file line number Diff line number Diff line change
1
+ import { Simulate as ReactSimulate } from 'react-dom/test-utils'
2
+
3
+ interface RenderResult {
4
+ container : HTMLDivElement
5
+ unmount : VoidFunction
6
+ queryByTestId : ( id : string ) => HTMLElement | null
7
+ }
8
+
9
+ export function render (
10
+ ui : React . ReactElement < any > ,
11
+ options ?: { container : HTMLElement } ,
12
+ ) : RenderResult
13
+
14
+ export function flushPromises ( ) : Promise < void >
15
+
16
+ export const Simulate : typeof ReactSimulate
You can’t perform that action at this time.
0 commit comments