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:
9
tests/components/TagListItem.snapshot.test.js
Normal file
9
tests/components/TagListItem.snapshot.test.js
Normal 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()
|
||||
})
|
||||
@@ -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>
|
||||
`;
|
||||
Reference in New Issue
Block a user