{"size": 656, "ext": "js", "max_stars_repo_path": "src/actions/messages.spec.js", "max_stars_repo_name": "datyayu/voxfeed-test", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/actions/messages.spec.js", "max_issues_repo_name": "datyayu/voxfeed-test", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/actions/messages.spec.js", "max_forks_repo_name": "datyayu/voxfeed-test", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.3333333333, "max_line_length": 78, "alphanum_fraction": 0.6326219512}
import { MessagesActions } from "./messages";

/******************
 *     SEARCH     *
 ******************/

test("changeSearchQuery() should create a CHANGE_SEARCH_QUERY action", () => {
  const action = MessagesActions.changeSearchQuery("hello");

  expect(action.type).toBe(MessagesActions.CHANGE_SEARCH_QUERY);
  expect(action.payload).toBe("hello");
});

/******************
 *   NAVIGATION   *
 ******************/

test("setActiveMessage() should create a SET_ACTIVE_MESSAGE action", () => {
  const action = MessagesActions.setActiveMessage(1);

  expect(action.type).toBe(MessagesActions.SET_ACTIVE_MESSAGE);
  expect(action.payload).toBe(1);
});
