import { RouterReducer } from "../RouterReducer";

describe("router reducer", () => {
  it("should return the initial state", () => {
    expect(RouterReducer(undefined, {})).toStrictEqual({});
    expect(RouterReducer()).toStrictEqual({});
  });

  it("should handle ROUTER/LOCATION_CHANGE", () => {
    expect(
      RouterReducer(
        {},
        {
          type: "ROUTER/LOCATION_CHANGE",
          payload: {
            location: "/tab",
            action: "PUSH",
          },
        },
      ),
    ).toStrictEqual({
      location: "/tab",
      action: "PUSH",
    });
  });
});
