diff --git a/__tests__/components/search/Item.test.tsx b/__tests__/components/search/Item.test.tsx new file mode 100644 index 00000000..cda1194c --- /dev/null +++ b/__tests__/components/search/Item.test.tsx @@ -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().toJSON() + expect(tree).toMatchSnapshot() +}) diff --git a/__tests__/components/search/Total.test.tsx b/__tests__/components/search/Total.test.tsx new file mode 100644 index 00000000..a30f60a0 --- /dev/null +++ b/__tests__/components/search/Total.test.tsx @@ -0,0 +1,9 @@ +import React from 'react' +import { render } from '@testing-library/react' +import renderer from 'react-test-renderer' +import Total from '../../../components/search/Total' + +test('📸 of Total component', () => { + const tree = renderer.create().toJSON() + expect(tree).toMatchSnapshot() +}) diff --git a/__tests__/components/search/__snapshots__/Item.test.tsx.snap b/__tests__/components/search/__snapshots__/Item.test.tsx.snap new file mode 100644 index 00000000..7aea4813 --- /dev/null +++ b/__tests__/components/search/__snapshots__/Item.test.tsx.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`📸 of Item component 1`] = ` +
+

+ + Title + +

+ + test org + +
+ A description. +
+
+`; diff --git a/__tests__/components/search/__snapshots__/Total.test.tsx.snap b/__tests__/components/search/__snapshots__/Total.test.tsx.snap new file mode 100644 index 00000000..1a202222 --- /dev/null +++ b/__tests__/components/search/__snapshots__/Total.test.tsx.snap @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`📸 of Total component 1`] = ` +

+ 2 + results found +

+`;