UNPKG

578 BJavaScriptView Raw
1import React from 'react'
2import 'jest-styled-components'
3
4import { ReferralSection } from 'SRC'
5
6const { shallowWithTheme } = global
7
8describe('(Styled Component) ReferralSection', () => {
9 const createReferralSection = (props) => {
10 return shallowWithTheme(<ReferralSection {...props} />)
11 }
12
13 test('matching the snapshot', () => {
14 expect(createReferralSection({
15 referralValue: '20',
16 homepageUrl: 'https://localhost:3001',
17 referralClicked: () => {},
18 referralCode: 'referral1234',
19 name: 'John Doe'
20 }))
21 .toMatchSnapshot()
22 })
23})
24
\No newline at end of file