@@ -22,7 +22,7 @@ describe('toHaveStyleRule', () => {
2222 width : 100% ;
2323 `
2424
25- it ( 'matches styles on the top-most node passed in' , ( ) => {
25+ test ( 'matches styles on the top-most node passed in' , ( ) => {
2626 const tree = renderer
2727 . create (
2828 < div css = { divStyle } >
@@ -40,7 +40,7 @@ describe('toHaveStyleRule', () => {
4040 expect ( svgNode ) . not . toHaveStyleRule ( 'color' , 'red' )
4141 } )
4242
43- it ( 'supports asymmetric matchers' , ( ) => {
43+ test ( 'supports asymmetric matchers' , ( ) => {
4444 const tree = renderer
4545 . create (
4646 < div css = { divStyle } >
@@ -57,14 +57,14 @@ describe('toHaveStyleRule', () => {
5757 expect ( svgNode ) . toHaveStyleRule ( 'width' , expect . stringMatching ( / .* % $ / ) )
5858 } )
5959
60- it ( 'fails if no styles are found' , ( ) => {
60+ test ( 'fails if no styles are found' , ( ) => {
6161 const tree = renderer . create ( < div /> ) . toJSON ( )
6262 const result = toHaveStyleRule ( tree , 'color' , 'red' )
6363 expect ( result . pass ) . toBe ( false )
6464 expect ( result . message ( ) ) . toBe ( 'Property not found: color' )
6565 } )
6666
67- it ( 'supports regex values' , ( ) => {
67+ test ( 'supports regex values' , ( ) => {
6868 const tree = renderer . create ( < div css = { divStyle } /> ) . toJSON ( )
6969 expect ( tree ) . toHaveStyleRule ( 'color' , / r e d / )
7070 } )
@@ -81,7 +81,7 @@ describe('toHaveStyleRule', () => {
8181 expect ( resultPass . message ( ) ) . toMatchSnapshot ( )
8282 } )
8383
84- it ( 'matches styles on the focus, hover targets' , ( ) => {
84+ test ( 'matches styles on the focus, hover targets' , ( ) => {
8585 const localDivStyle = css `
8686 color : white;
8787 & : hover {
@@ -104,7 +104,7 @@ describe('toHaveStyleRule', () => {
104104 expect ( tree ) . toHaveStyleRule ( 'color' , 'white' )
105105 } )
106106
107- it ( 'matches styles on the nested component or html element' , ( ) => {
107+ test ( 'matches styles on the nested component or html element' , ( ) => {
108108 const Svg = styled ( 'svg' ) `
109109 width: 100%;
110110 fill: blue;
@@ -134,7 +134,7 @@ describe('toHaveStyleRule', () => {
134134 expect ( tree ) . toHaveStyleRule ( 'fill' , 'green' , { target : `${ Svg } ` } )
135135 } )
136136
137- it ( 'matches target styles by regex' , ( ) => {
137+ test ( 'matches target styles by regex' , ( ) => {
138138 const localDivStyle = css `
139139 a {
140140 color : yellow;
@@ -154,7 +154,7 @@ describe('toHaveStyleRule', () => {
154154 expect ( tree ) . toHaveStyleRule ( 'color' , 'yellow' , { target : / a $ / } )
155155 } )
156156
157- it ( 'matches proper style for css' , ( ) => {
157+ test ( 'matches proper style for css' , ( ) => {
158158 const tree = renderer
159159 . create (
160160 < div
@@ -169,7 +169,7 @@ describe('toHaveStyleRule', () => {
169169 expect ( tree ) . toHaveStyleRule ( 'color' , 'hotpink' )
170170 } )
171171
172- it ( 'matches style of the media' , ( ) => {
172+ test ( 'matches style of the media' , ( ) => {
173173 const Svg = styled ( 'svg' ) `
174174 width: 100%;
175175 `
@@ -212,7 +212,7 @@ describe('toHaveStyleRule', () => {
212212 } )
213213 } )
214214
215- it ( 'matches styles with target and media options' , ( ) => {
215+ test ( 'matches styles with target and media options' , ( ) => {
216216 const localDivStyle = css `
217217 color : white;
218218 @media (min-width : 420px ) {
@@ -240,7 +240,7 @@ describe('toHaveStyleRule', () => {
240240 expect ( tree ) . toHaveStyleRule ( 'color' , 'white' )
241241 } )
242242
243- it ( 'fails if option media invalid' , ( ) => {
243+ test ( 'fails if option media invalid' , ( ) => {
244244 const Div = styled ( 'div' ) `
245245 font-size: 30px;
246246 @media (min-width: 420px) {
@@ -257,7 +257,7 @@ describe('toHaveStyleRule', () => {
257257 expect ( result . message ( ) ) . toBe ( 'Property not found: font-size' )
258258 } )
259259
260- it ( 'matches styles for a component used as selector' , ( ) => {
260+ test ( 'matches styles for a component used as selector' , ( ) => {
261261 const Bar = styled . div ``
262262
263263 const Foo = styled . div `
@@ -278,7 +278,7 @@ describe('toHaveStyleRule', () => {
278278 expect ( tree . children [ 0 ] ) . toHaveStyleRule ( 'color' , 'hotpink' )
279279 } )
280280
281- it ( 'takes specificity into account when matching styles (basic)' , ( ) => {
281+ test ( 'takes specificity into account when matching styles (basic)' , ( ) => {
282282 const Bar = styled . div `
283283 color : yellow;
284284 `
@@ -302,7 +302,7 @@ describe('toHaveStyleRule', () => {
302302 expect ( tree . children [ 0 ] ) . toHaveStyleRule ( 'color' , 'hotpink' )
303303 } )
304304
305- it ( 'should throw a friendly error when it receives an array' , ( ) => {
305+ test ( 'should throw a friendly error when it receives an array' , ( ) => {
306306 const tree = renderer
307307 . create (
308308 < >
@@ -323,7 +323,7 @@ describe('toHaveStyleRule', () => {
323323 )
324324 } )
325325 ; ( isReact16 ? describe : describe . skip ) ( 'enzyme' , ( ) => {
326- it ( 'supports enzyme `mount` method' , ( ) => {
326+ test ( 'supports enzyme `mount` method' , ( ) => {
327327 const Component = ( ) => (
328328 < div css = { divStyle } >
329329 < svg css = { svgStyle } />
@@ -338,7 +338,7 @@ describe('toHaveStyleRule', () => {
338338 expect ( svgNode ) . not . toHaveStyleRule ( 'color' , 'red' )
339339 } )
340340
341- it ( 'supports enzyme `render` method' , ( ) => {
341+ test ( 'supports enzyme `render` method' , ( ) => {
342342 const Component = ( ) => (
343343 < div css = { divStyle } >
344344 < svg css = { svgStyle } />
@@ -353,7 +353,7 @@ describe('toHaveStyleRule', () => {
353353 expect ( svgNode ) . not . toHaveStyleRule ( 'color' , 'red' )
354354 } )
355355
356- it ( 'supports enzyme `shallow` method' , ( ) => {
356+ test ( 'supports enzyme `shallow` method' , ( ) => {
357357 const Component = ( ) => (
358358 < div css = { divStyle } >
359359 < svg css = { svgStyle } />
@@ -368,7 +368,7 @@ describe('toHaveStyleRule', () => {
368368 expect ( svgNode ) . not . toHaveStyleRule ( 'color' , 'red' )
369369 } )
370370
371- it ( 'supports styled components' , ( ) => {
371+ test ( 'supports styled components' , ( ) => {
372372 const Div = styled ( 'div' ) `
373373 color: red;
374374 `
0 commit comments