Skip to content

Commit 185bc80

Browse files
chore: Added unit tests
1 parent 8c459b0 commit 185bc80

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/AutoComplete/AutoComplete.unit.test.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,11 @@ describe('AutoComplete', () => {
198198
screen.getByRole('option', { name: 'melancia' }),
199199
).toBeInTheDocument();
200200
});
201+
202+
it('Should have a value when prop value is set', () => {
203+
const initialValue = 'initial value';
204+
render(<AutoComplete value={initialValue} suggestions={[]} />);
205+
const autoCompleteInput = screen.getByRole('combobox');
206+
expect(autoCompleteInput).toHaveAttribute('value', initialValue);
207+
});
201208
});

0 commit comments

Comments
 (0)