File tree 2 files changed +10
-17
lines changed
2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change 36
36
"author" :
" Kent C. Dodds <[email protected] > (http://kentcdodds.com/)" ,
37
37
"license" : " MIT" ,
38
38
"dependencies" : {
39
- "dom-testing-library" : " ^1.0 .0" ,
40
- "wait-for-expect" : " 0.4 .0"
39
+ "dom-testing-library" : " ^1.10 .0" ,
40
+ "wait-for-expect" : " ^0.5 .0"
41
41
},
42
42
"devDependencies" : {
43
- "@types/react-dom" : " ^16.0.4 " ,
43
+ "@types/react-dom" : " ^16.0.5 " ,
44
44
"axios" : " ^0.18.0" ,
45
45
"history" : " ^4.7.2" ,
46
46
"jest-in-case" : " ^1.0.2" ,
47
- "kcd-scripts" : " ^0.36.1 " ,
48
- "react" : " ^16.2.0 " ,
49
- "react-dom" : " ^16.2.0 " ,
47
+ "kcd-scripts" : " ^0.37.0 " ,
48
+ "react" : " ^16.3.2 " ,
49
+ "react-dom" : " ^16.3.2 " ,
50
50
"react-redux" : " ^5.0.7" ,
51
51
"react-router" : " ^4.2.0" ,
52
52
"react-router-dom" : " ^4.2.2" ,
53
- "react-transition-group" : " ^2.2 .1" ,
54
- "redux" : " ^3.7.2 "
53
+ "react-transition-group" : " ^2.3 .1" ,
54
+ "redux" : " ^4.0.0 "
55
55
},
56
56
"peerDependencies" : {
57
57
"react-dom" : " *"
Original file line number Diff line number Diff line change 1
1
import ReactDOM from 'react-dom'
2
2
import { Simulate } from 'react-dom/test-utils'
3
- import { queries , wait , fireEvent } from 'dom-testing-library'
3
+ import { bindElementToQueries , wait , fireEvent } from 'dom-testing-library'
4
4
5
5
function render ( ui , { container = document . createElement ( 'div' ) } = { } ) {
6
6
ReactDOM . render ( ui , container )
7
- const containerHelpers = Object . entries ( queries ) . reduce (
8
- ( helpers , [ key , fn ] ) => {
9
- helpers [ key ] = fn . bind ( null , container )
10
- return helpers
11
- } ,
12
- { } ,
13
- )
14
7
return {
15
8
container,
16
9
unmount : ( ) => ReactDOM . unmountComponentAtNode ( container ) ,
17
- ...containerHelpers ,
10
+ ...bindElementToQueries ( container ) ,
18
11
}
19
12
}
20
13
You can’t perform that action at this time.
0 commit comments