File tree Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change 3636 "author" :
" Kent C. Dodds <[email protected] > (http://kentcdodds.com/)" ,
3737 "license" : " MIT" ,
3838 "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"
4141 },
4242 "devDependencies" : {
43- "@types/react-dom" : " ^16.0.4 " ,
43+ "@types/react-dom" : " ^16.0.5 " ,
4444 "axios" : " ^0.18.0" ,
4545 "history" : " ^4.7.2" ,
4646 "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 " ,
5050 "react-redux" : " ^5.0.7" ,
5151 "react-router" : " ^4.2.0" ,
5252 "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 "
5555 },
5656 "peerDependencies" : {
5757 "react-dom" : " *"
Original file line number Diff line number Diff line change 11import ReactDOM from 'react-dom'
22import { Simulate } from 'react-dom/test-utils'
3- import { queries , wait , fireEvent } from 'dom-testing-library'
3+ import { bindElementToQueries , wait , fireEvent } from 'dom-testing-library'
44
55function render ( ui , { container = document . createElement ( 'div' ) } = { } ) {
66 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- )
147 return {
158 container,
169 unmount : ( ) => ReactDOM . unmountComponentAtNode ( container ) ,
17- ...containerHelpers ,
10+ ...bindElementToQueries ( container ) ,
1811 }
1912}
2013
You can’t perform that action at this time.
0 commit comments