@@ -173,13 +173,15 @@ describe('Tooltip', () => {
173
173
]
174
174
] ) . it ( 'Popup color generation - show' , ( props , res ) => {
175
175
render (
176
- < span id = "colorSpecInvoker" data-tip data-for = "colorSpec" onMouseEnter = { ( ) => console . log ( 'ENTER*******' ) } >
176
+ < span id = "colorSpecInvoker" data-tip data-for = "colorSpec" >
177
177
Invoker
178
178
</ span >
179
179
) ;
180
180
render ( < ReactTooltip id = "colorSpec" { ...props } /> ) ;
181
- fireEvent ( document
182
- . getElementById ( 'colorSpecInvoker' ) , new window . Event ( 'mouseenter' ) )
181
+ fireEvent (
182
+ document . getElementById ( 'colorSpecInvoker' ) ,
183
+ new window . Event ( 'mouseenter' )
184
+ ) ;
183
185
184
186
const tooltip = document . getElementById ( 'colorSpec' ) ;
185
187
expect ( tooltip . className ) . to . match (
@@ -194,8 +196,9 @@ describe('Tooltip', () => {
194
196
195
197
const uuid = tooltip . className . split ( ' ' ) [ 1 ] ;
196
198
const cssRules = tooltip . firstElementChild . sheet . cssRules ;
197
- const mainCssRule = cssRules . find ( rule => rule . selectorText === `.${ uuid } ` )
198
- . style ;
199
+ const mainCssRule = cssRules . find (
200
+ ( rule ) => rule . selectorText === `.${ uuid } `
201
+ ) . style ;
199
202
200
203
expect ( mainCssRule . color , 'Text color' ) . to . equal ( res . textColor ) ;
201
204
expect ( mainCssRule . background , 'Background color' ) . to . equal ( res . background ) ;
@@ -204,10 +207,10 @@ describe('Tooltip', () => {
204
207
) ;
205
208
206
209
const arrowPositions = [ 'top' , 'bottom' , 'left' , 'right' ] ;
207
- arrowPositions . forEach ( pos => {
210
+ arrowPositions . forEach ( ( pos ) => {
208
211
expect (
209
212
cssRules . find (
210
- rule => rule . selectorText === `.${ uuid } .place-${ pos } ::after`
213
+ ( rule ) => rule . selectorText === `.${ uuid } .place-${ pos } ::after`
211
214
) . style [ `border-${ pos } -color` ] ,
212
215
pos + ' arrow color'
213
216
) . to . equal ( res . arrowColor ? res . arrowColor : res . background ) ;
0 commit comments