// const searchAction = (value) => dispatch => { dispatch({ type: SEARCH_TEXT, text: value }) } //Test describe("Testing searchAction()", () => { beforeEach(() => { // Runs before each test in the suite store.clearActions(); }); it("should get SEARCH_TEXT", () => { const value = "datastructure"; const expectedActions = [ { text: value, type: "SEARCH_TEXT", }, ]; store.dispatch(searchAction(value)); expect(store.getActions()).toEqual(expectedActions); }); });