UNPKG

1.02 kBJavaScriptView Raw
1import React from 'react'
2import 'jest-styled-components'
3
4import { SubscriptionShipping } from 'SRC'
5
6import { UnstyledSubscriptionShipping } from './subscriptionShipping'
7
8const { mountWithTheme } = global
9
10describe('(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
21describe('(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})