1
- import React from 'react'
2
- import { shallow } from 'enzyme'
3
- import Bullets from './bullets'
1
+ import React from 'react' ;
2
+ import { shallow } from 'enzyme' ;
3
+ import Bullets from './bullets' ;
4
4
5
-
6
- describe ( "Bullets Battery Tests" , ( ) => {
7
-
8
- describe ( "Composition" , ( ) => {
9
- it ( "Should render empty bullets" , ( ) => {
10
- const wrapper = shallow ( < Bullets rootElement = ".foo" /> ) ;
11
- expect ( wrapper . find ( "button" ) ) . toHaveLength ( 0 ) ;
12
- expect ( wrapper . find ( "nav" ) . prop ( "className" ) ) . toEqual ( ".foo__bullets" )
13
- } )
14
- it ( "Should render bullets with for given media" , ( ) => {
15
- const media = [ 1 , 2 , 3 , 4 , 5 ]
16
- const wrapper = shallow ( < Bullets onClick = { jest . fn } media = { media } rootElement = ".foo" /> ) ;
17
- const buttons = wrapper . find ( "button" )
18
- expect ( buttons ) . toHaveLength ( 5 )
19
- expect ( buttons . at ( 0 ) . prop ( "className" ) ) . toEqual ( ".foo__bullets--active" )
20
- expect ( buttons . at ( 0 ) . prop ( "data-index" ) ) . toEqual ( 0 )
21
- expect ( buttons . at ( 0 ) . text ( ) ) . toEqual ( "0" )
22
- } )
23
- } )
24
-
25
-
26
- } )
5
+ describe ( 'Bullets Battery Tests' , ( ) => {
6
+ describe ( 'Composition' , ( ) => {
7
+ it ( 'Should render empty bullets' , ( ) => {
8
+ const wrapper = shallow ( < Bullets rootElement = ".foo" /> ) ;
9
+ expect ( wrapper . find ( 'button' ) ) . toHaveLength ( 0 ) ;
10
+ expect ( wrapper . find ( 'nav' ) . prop ( 'className' ) ) . toEqual ( '.foo__bullets' ) ;
11
+ } ) ;
12
+ it ( 'Should render bullets with for given media' , ( ) => {
13
+ const media = [ 1 , 2 , 3 , 4 , 5 ] ;
14
+ const wrapper = shallow (
15
+ < Bullets onClick = { jest . fn } media = { media } rootElement = ".foo" />
16
+ ) ;
17
+ const buttons = wrapper . find ( 'button' ) ;
18
+ expect ( buttons ) . toHaveLength ( 5 ) ;
19
+ expect ( buttons . at ( 0 ) . prop ( 'className' ) ) . toEqual ( '.foo__bullets--active' ) ;
20
+ expect ( buttons . at ( 0 ) . prop ( 'data-index' ) ) . toEqual ( 0 ) ;
21
+ expect ( buttons . at ( 0 ) . text ( ) ) . toEqual ( '0' ) ;
22
+ } ) ;
23
+ } ) ;
24
+ } ) ;
0 commit comments