Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/components/SearchInput/SearchInput.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,20 @@ it("preserves shared field refs, value callbacks, Enter behavior and multiline r
const ref = React.createRef<HTMLInputElement | HTMLTextAreaElement>();
const onChange = vi.fn();
const onSubmit = vi.fn();
const props = {
value: "needle",
onChange,
onSubmit,
multiline,
inputRef: ref as React.RefObject<
HTMLInputElement | HTMLTextAreaElement
>,
};
await act(async () =>
root.render(
React.createElement(Component, {
value: "needle",
onChange,
onSubmit,
multiline,
inputRef: ref as React.RefObject<
HTMLInputElement | HTMLTextAreaElement
>,
})
Component === SearchInput
? React.createElement(SearchInput, props)
: React.createElement(ReplaceInput, props)
)
);
const field = host.querySelector<
Expand Down
Loading