expect(onSearch).toBeCalledWith("current value");
});
it("calls onSearch only once after no change happened during the specified time", () => {
const searchBar = mount(<SearchBarView value="" onSearch={onSearch} debounce={1000} currentView='' open={true} onSetView={jest.fn()} openView={jest.fn()} closeView={jest.fn()} />);
searchBar.find("input").simulate("change", { target: { value: "current value" } });
expect(onSearch).toBeCalledWith("current value");
});
it("calls onSearch only once after no change happened during the specified time", () => {
const searchBar = mount(<SearchBarView value="" onSearch={onSearch} debounce={1000} currentView='' open={true} onSetView={jest.fn()} openView={jest.fn()} closeView={jest.fn()} />);
searchBar.find("input").simulate("change", { target: { value: "current value" } });