@@ -155,10 +155,12 @@ eventTypes.forEach(({type, events, elementType, init}) => {
155
155
const ref = React . createRef ( )
156
156
const spy = jest . fn ( )
157
157
158
- await render ( React . createElement ( elementType , {
159
- [ propName ] : spy ,
160
- ref,
161
- } ) )
158
+ await render (
159
+ React . createElement ( elementType , {
160
+ [ propName ] : spy ,
161
+ ref,
162
+ } ) ,
163
+ )
162
164
163
165
await fireEvent [ eventName ] ( ref . current , init )
164
166
expect ( spy ) . toHaveBeenCalledTimes ( 1 )
@@ -216,21 +218,26 @@ test('calling `fireEvent` directly works too', async () => {
216
218
const {
217
219
container : { firstChild : button } ,
218
220
} = await render ( < button onClick = { handleEvent } /> )
219
- await fireEvent ( button , new Event ( 'MouseEvent' , {
220
- bubbles : true ,
221
- cancelable : true ,
222
- button : 0 ,
223
- } ) )
221
+ await fireEvent (
222
+ button ,
223
+ new Event ( 'MouseEvent' , {
224
+ bubbles : true ,
225
+ cancelable : true ,
226
+ button : 0 ,
227
+ } ) ,
228
+ )
224
229
} )
225
230
226
231
test ( 'blur/focus bubbles in react' , async ( ) => {
227
232
const handleBlur = jest . fn ( )
228
233
const handleBubbledBlur = jest . fn ( )
229
234
const handleFocus = jest . fn ( )
230
235
const handleBubbledFocus = jest . fn ( )
231
- const { container} = await render ( < div onBlur = { handleBubbledBlur } onFocus = { handleBubbledFocus } >
232
- < button onBlur = { handleBlur } onFocus = { handleFocus } />
233
- </ div > )
236
+ const { container} = await render (
237
+ < div onBlur = { handleBubbledBlur } onFocus = { handleBubbledFocus } >
238
+ < button onBlur = { handleBlur } onFocus = { handleFocus } />
239
+ </ div > ,
240
+ )
234
241
const button = container . firstChild . firstChild
235
242
236
243
await fireEvent . focus ( button )
0 commit comments