Merge branch 'master' of github.com:datopian/portal
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React from 'react'
|
||||
import { render } from '@testing-library/react'
|
||||
import renderer from 'react-test-renderer'
|
||||
import Total from '../../../components/search/Total'
|
||||
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(<Total total={2} />).toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
test('📸 of Total component', () => {
|
||||
const tree = renderer.create(<Total total={2} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
import React from 'react'
|
||||
import { render } from '@testing-library/react'
|
||||
import renderer from 'react-test-renderer'
|
||||
import Index from '../../pages/index'
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import Index from '../../pages/index';
|
||||
|
||||
test('📸 of Home page', () => {
|
||||
const tree = renderer.create(<Index />).toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
test('📸 of Home page', () => {
|
||||
const tree = renderer.create(<Index />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('renders text from hero section', () => {
|
||||
const { getByText } = render(<Index />)
|
||||
const linkElement = getByText(
|
||||
/Find, Share and Publish/
|
||||
)
|
||||
expect(linkElement).toBeInTheDocument()
|
||||
})
|
||||
const { getByText } = render(<Index />);
|
||||
const linkElement = getByText(/Find, Share and Publish/);
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user