|
@@ -15,7 +15,7 @@ describe("GamePanel", () => {
|
|
it("renders for NORMAL game", () => {
|
|
it("renders for NORMAL game", () => {
|
|
useCurrentRound.mockReturnValue("");
|
|
useCurrentRound.mockReturnValue("");
|
|
useGameConfig.mockReturnValue({ ruleSet: NORMAL });
|
|
useGameConfig.mockReturnValue({ ruleSet: NORMAL });
|
|
- const rendered = shallow(<GamePanel/>);
|
|
|
|
|
|
+ const rendered = shallow(<GamePanel />);
|
|
expect(rendered).toMatchSnapshot();
|
|
expect(rendered).toMatchSnapshot();
|
|
expect(usePreventNavigation).toHaveBeenCalled();
|
|
expect(usePreventNavigation).toHaveBeenCalled();
|
|
expect(useGameConfig).toHaveBeenCalled();
|
|
expect(useGameConfig).toHaveBeenCalled();
|
|
@@ -24,7 +24,7 @@ describe("GamePanel", () => {
|
|
it("renders for end of game", () => {
|
|
it("renders for end of game", () => {
|
|
useCurrentRound.mockReturnValue(null);
|
|
useCurrentRound.mockReturnValue(null);
|
|
useGameConfig.mockReturnValue({ ruleSet: NORMAL });
|
|
useGameConfig.mockReturnValue({ ruleSet: NORMAL });
|
|
- const rendered = shallow(<GamePanel/>);
|
|
|
|
|
|
+ const rendered = shallow(<GamePanel />);
|
|
expect(rendered).toMatchSnapshot();
|
|
expect(rendered).toMatchSnapshot();
|
|
expect(usePreventNavigation).toHaveBeenCalled();
|
|
expect(usePreventNavigation).toHaveBeenCalled();
|
|
expect(useGameConfig).toHaveBeenCalled();
|
|
expect(useGameConfig).toHaveBeenCalled();
|
|
@@ -33,7 +33,7 @@ describe("GamePanel", () => {
|
|
it("renders for FROZEN game", () => {
|
|
it("renders for FROZEN game", () => {
|
|
useCurrentRound.mockReturnValue("");
|
|
useCurrentRound.mockReturnValue("");
|
|
useGameConfig.mockReturnValue({ ruleSet: FROZEN });
|
|
useGameConfig.mockReturnValue({ ruleSet: FROZEN });
|
|
- const rendered = shallow(<GamePanel/>);
|
|
|
|
|
|
+ const rendered = shallow(<GamePanel />);
|
|
expect(rendered).toMatchSnapshot();
|
|
expect(rendered).toMatchSnapshot();
|
|
expect(usePreventNavigation).toHaveBeenCalled();
|
|
expect(usePreventNavigation).toHaveBeenCalled();
|
|
expect(useGameConfig).toHaveBeenCalled();
|
|
expect(useGameConfig).toHaveBeenCalled();
|
|
@@ -42,7 +42,7 @@ describe("GamePanel", () => {
|
|
it("renders for RACE game", () => {
|
|
it("renders for RACE game", () => {
|
|
useCurrentRound.mockReturnValue("");
|
|
useCurrentRound.mockReturnValue("");
|
|
useGameConfig.mockReturnValue({ ruleSet: RACE });
|
|
useGameConfig.mockReturnValue({ ruleSet: RACE });
|
|
- const rendered = shallow(<GamePanel/>);
|
|
|
|
|
|
+ const rendered = shallow(<GamePanel />);
|
|
expect(rendered).toMatchSnapshot();
|
|
expect(rendered).toMatchSnapshot();
|
|
expect(usePreventNavigation).toHaveBeenCalled();
|
|
expect(usePreventNavigation).toHaveBeenCalled();
|
|
expect(useGameConfig).toHaveBeenCalled();
|
|
expect(useGameConfig).toHaveBeenCalled();
|