diff --git a/frontend/app/components/select/select.spec.tsx b/frontend/app/components/select/select.spec.tsx new file mode 100644 index 00000000..a55aab73 --- /dev/null +++ b/frontend/app/components/select/select.spec.tsx @@ -0,0 +1,46 @@ +import '@testing-library/jest-dom'; +import { h } from 'preact'; +import { render } from 'tests/utils'; +import { Select } from './select'; + +const items = [ + { + label: 'None', + value: 'none', + }, + { + label: 'Oldest', + value: 'oldest', + }, + { + label: 'Newest', + value: 'newest', + }, + { + label: 'Best', + value: 'best', + }, + { + label: 'Worst', + value: 'worst', + }, +]; + +describe('); + + expect(container.querySelector('.select')).toBeInTheDocument(); + expect(container.querySelector('.select-arrow')).toBeInTheDocument(); + expect(container.querySelector('.select-element')).toBeInTheDocument(); + }); + + it('should render selected item', () => { + const { container, getAllByText } = render(