import React from "react";
import { shallow } from "enzyme";
import RoundTimer from "../components/screens/GamePanel/GuessPane/RoundTimer";

jest.mock("../domain/gameStore");

import { useRoundSeconds } from "../domain/gameStore";

describe("RoundTimer", () => {
  it("renders with time left", () => {
    useRoundSeconds.mockReturnValue(100);
    const rendered = shallow(<RoundTimer />);
    expect(rendered).toMatchSnapshot();
  });
  it("renders with no time left", () => {
    useRoundSeconds.mockReturnValue(0);
    const rendered = shallow(<RoundTimer />);
    expect(rendered).toMatchSnapshot();
  });
});
