[examples][sm] - renaming ckan to ckan-2021

This commit is contained in:
Luccas Mateus de Medeiros Gomes
2023-04-13 21:24:25 -03:00
parent 64e97d3884
commit afc2101da0
76 changed files with 12 additions and 12 deletions

View File

@@ -0,0 +1,23 @@
import React from 'react';
import { render } from '@testing-library/react';
import Form from '../../../components/search/Form';
const useRouter = jest.spyOn(require('next/router'), 'useRouter');
test('📸 of Form component with empty', () => {
useRouter.mockImplementationOnce(() => ({
query: { search: '', sort: '' },
}));
const { container } = render(<Form />);
expect(container).toMatchSnapshot();
});
test('📸 of Form component with query', () => {
useRouter.mockImplementationOnce(() => ({
query: { search: 'gdp', sort: '' },
}));
const { container } = render(<Form />);
expect(container).toMatchSnapshot();
});