[tests][m]: more tests for Search components.

This commit is contained in:
anuveyatsu
2020-06-17 16:40:04 +06:00
parent 2ecd88388a
commit ec646f1f10
9 changed files with 319 additions and 106 deletions

View 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()
})