Skip to content

Commit

Permalink
test(heading): add tests for heading component
Browse files Browse the repository at this point in the history
  • Loading branch information
koca committed Mar 1, 2020
1 parent 139f163 commit 976125d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/kiwi-core/src/Heading/tests/Heading.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Heading from '../'
import { render } from '@/packages/kiwi-core/src/test-utils'

const renderComponent = (props) => {
const base = {
components: { Heading },
template: `<Heading>Header</Heading>`,
...props
}
return render(base)
}

it('should render correctly', () => {
const { asFragment } = renderComponent()

expect(asFragment()).toMatchSnapshot()
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`should render correctly 1`] = `
<DocumentFragment>
<h1
class="css-tyxjib"
>
Header
</h1>
</DocumentFragment>
`;

0 comments on commit 976125d

Please sign in to comment.