We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8eb411c commit 787ebfdCopy full SHA for 787ebfd
packages/components/src/components/Input/__tests__/index.browser.test.tsx
@@ -155,6 +155,16 @@ describe('Input', () => {
155
})
156
expect(onChange).toHaveBeenCalledWith(expect.any(Object))
157
158
+
159
+ it('should call onClear props when click clear button', () => {
160
+ const onClear = vi.fn()
161
+ const { container } = render(<Input onClear={onClear} />)
162
+ fireEvent.change(container.querySelector('input')!, {
163
+ target: { value: 'test' },
164
+ })
165
+ fireEvent.click(container.querySelector('[aria-label="clear-button"]')!)
166
+ expect(onClear).toHaveBeenCalled()
167
168
169
170
describe('Controlled Input', () => {
0 commit comments