PHP Classes

File: tests/unit/components/Search.test.tsx

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   Maniruzzaman WordPress Frontend Editor   tests/unit/components/Search.test.tsx   Download  
File: tests/unit/components/Search.test.tsx
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Maniruzzaman WordPress Frontend Editor
WordPress plugin for visual front-end development
Author: By
Last change:
Date: 8 months ago
Size: 859 bytes
 

Contents

Class file image Download
import { render } from '@testing-library/react'; import Search from '../../../src/components/spacex-data-search/Search'; describe('Search', () => { it('renders the form with the correct options', () => { const onSearched = jest.fn(); const onFiltered = jest.fn(); const searchButtonstyle = {}; const { getByText } = render( <Search filter={{ status: '', mission: '', type: '' }} onSearched={onSearched} onFiltered={onFiltered} searchButtonstyle={searchButtonstyle} /> ); expect(getByText('Search')).toBeInTheDocument(); expect(getByText('All types')).toBeInTheDocument(); expect(getByText('All missions')).toBeInTheDocument(); expect(getByText('All statuses')).toBeInTheDocument(); }); });