[tests][s]: initial tests for components.

This commit is contained in:
anuveyatsu
2020-06-12 16:16:56 +06:00
parent 2f8707a6d4
commit ebfe884b7b
4 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import React from 'react'
import { render } from '@testing-library/react'
import renderer from 'react-test-renderer'
import Item from '../../../components/search/Item'
test('📸 of Item component', () => {
const datapackage = {
name: 'test',
title: 'Title',
description: 'A description.',
organization: {
title: 'test org',
name: 'test-org'
}
}
const tree = renderer.create(<Item datapackage={datapackage} />).toJSON()
expect(tree).toMatchSnapshot()
})