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

jest.mock("../components/screens/GamePanel/GuessPane/hooks");

import { useRoundTimer } from "../components/screens/GamePanel/GuessPane/hooks";

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