1 | import React from 'react'
|
2 | import 'jest-styled-components'
|
3 |
|
4 | import { SubscriptionShipping } from 'SRC'
|
5 |
|
6 | import { UnstyledSubscriptionShipping } from './subscriptionShipping'
|
7 |
|
8 | const { mountWithTheme } = global
|
9 |
|
10 | describe('(Styled component) SubscriptionShipping', () => {
|
11 | const createSubscriptionShipping = (props) => {
|
12 | return mountWithTheme(<SubscriptionShipping {...props} />)
|
13 | }
|
14 |
|
15 | test('matching the snapshot', () => {
|
16 | expect(createSubscriptionShipping())
|
17 | .toMatchSnapshot()
|
18 | })
|
19 | })
|
20 |
|
21 | describe('(Component) UnstyledSubscriptionShipping', () => {
|
22 | const createUnstyledSubscriptionShipping = (props) => {
|
23 | return mountWithTheme(<UnstyledSubscriptionShipping {...props} />)
|
24 | }
|
25 |
|
26 | test('matching the snapshot', () => {
|
27 | expect(createUnstyledSubscriptionShipping())
|
28 | .toMatchSnapshot()
|
29 | })
|
30 |
|
31 | test('setting the className', () => {
|
32 | const className = 'example-class'
|
33 | expect(
|
34 | createUnstyledSubscriptionShipping({className: className}).prop('className')
|
35 | ).toEqual(className)
|
36 | })
|
37 | })
|