[tests][m]: more tests for Search components.
This commit is contained in:
18
__tests__/components/search/Input.test.tsx
Normal file
18
__tests__/components/search/Input.test.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import React from 'react'
|
||||
import { render } from '@testing-library/react'
|
||||
import renderer from 'react-test-renderer'
|
||||
import Input from '../../../components/search/Input'
|
||||
|
||||
test('📸 of Input component with empty', () => {
|
||||
const query = {}
|
||||
const tree = renderer.create(<Input query={query} />).toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
test('📸 of Input component with query', () => {
|
||||
const query = {
|
||||
q: 'gdp'
|
||||
}
|
||||
const tree = renderer.create(<Input query={query} />).toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
Reference in New Issue
Block a user