1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Add jest and simple test

This commit is contained in:
Nikolay Lopin
2018-03-25 20:02:06 +03:00
parent d3f9c170ac
commit b098a15e9c
6 changed files with 1458 additions and 109 deletions

View File

@@ -0,0 +1,9 @@
import React from 'react'
import renderer from 'react-test-renderer'
import TagListItem from 'browser/components/TagListItem'
it('TagListItem renders correctly', () => {
const tagListItem = renderer.create(<TagListItem name='Test' handleClickTagListItem={jest.fn()} />)
expect(tagListItem.toJSON()).toMatchSnapshot()
})

View File

@@ -0,0 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`TagListItem renders correctly 1`] = `
<button
className="tagList-item"
onClick={[Function]}
>
<span
className="tagList-item-name"
>
# Test
<span
className="tagList-item-count"
>
</span>
</span>
</button>
`;