@rocketsofawesome/mirage
Version:
[Live Demo of the Pattern Library](https://rocketsofawesome.github.io/mirage/)
31 lines (24 loc) • 719 B
JavaScript
import React from 'react'
import { css } from 'styled-components'
import 'jest-styled-components'
import { PersistantPricing } from 'SRC'
const { mountWithTheme } = global
const defaultProps = {
}
describe('(Styled Component) PersistantPricing', () => {
const createPersistantPricing = (inProps) => {
const props = {
...defaultProps,
...inProps
}
return mountWithTheme(<PersistantPricing {...props} />)
}
test('matching the snapshot', () => {
expect(createPersistantPricing())
.toMatchSnapshot()
})
test('renders the children', () => {
const child = <span>Example</span>
expect(createPersistantPricing({children: [child]}).find('span').length).toEqual(1)
})
})