@rocketsofawesome/mirage
Version:
[Live Demo of the Pattern Library](https://rocketsofawesome.github.io/mirage/)
26 lines (20 loc) • 619 B
JavaScript
import React from 'react'
import { css } from 'styled-components'
import 'jest-styled-components'
import { H1, MirageMarkdown } from 'SRC'
const { mountWithTheme } = global
describe('(Styled Component) markdown', () => {
const defaultProps = {
children: '# Heading 1'
}
const createmarkdown = (props = defaultProps) => {
return mountWithTheme(<MirageMarkdown {...props} />)
}
test('matching the snapshot', () => {
expect(createmarkdown())
.toMatchSnapshot()
})
test('Rendering the proper typography elements', () => {
expect(createmarkdown().find('h1').length).toEqual(1)
})
})