@@ -4,28 +4,26 @@ import { shallow } from 'enzyme'
44import { NAMESPACE } from '../../../constants'
55import { Card } from '../'
66
7- describe ( '<Card />' , ( ) => {
7+ describe ( '<Card.Wrapper />' , ( ) => {
88 it ( 'passes in an optional className override' , ( ) => {
9- const $ = shallow ( < Card className = "something else" /> )
9+ const $ = shallow ( < Card . Wrapper className = "something else" /> )
1010 expect ( $ . hasClass ( `${ NAMESPACE } c-card` ) ) . toBe ( true )
1111 expect ( $ . hasClass ( 'something else' ) ) . toBe ( true )
1212 } )
1313
1414 it ( 'renders a defined tag type' , ( ) => {
15- const $ = shallow ( < Card tag = "article" > _ </ Card > )
15+ const $ = shallow ( < Card . Wrapper tag = "article" / >)
1616 expect ( $ . type ( ) ) . toBe ( 'article' )
1717 } )
1818
1919 it ( 'renders a div by default' , ( ) => {
20- const $ = shallow ( < Card > - </ Card > )
20+ const $ = shallow ( < Card . Wrapper / >)
2121 expect ( $ . type ( ) ) . toBe ( 'div' )
2222 } )
2323
2424 it ( 'renders with attributes' , ( ) => {
2525 const $ = shallow (
26- < Card style = { { position : 'relative' } } ariaHidden >
27- _
28- </ Card >
26+ < Card . Wrapper style = { { position : 'relative' } } ariaHidden />
2927 )
3028 expect ( $ . prop ( 'style' ) ) . toEqual ( {
3129 position : 'relative'
@@ -34,7 +32,7 @@ describe('<Card />', () => {
3432 } )
3533
3634 it ( 'renders children' , ( ) => {
37- const $ = shallow ( < Card > test child</ Card > )
35+ const $ = shallow ( < Card . Wrapper > test child</ Card . Wrapper > )
3836 expect ( $ . contains ( 'test child' ) ) . toBe ( true )
3937 } )
4038} )
0 commit comments