Skip to content

Commit

Permalink
Rename mocks file names to avoid JEST error: jestjs/jest#2070
Browse files Browse the repository at this point in the history
  • Loading branch information
liamqma committed Jun 5, 2020
1 parent 173a5ea commit 4f5333f
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/App/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jest.mock("../../repository/firestore");

jest.mock("../../hooks/use-auth");

jest.mock("../Loading");
jest.mock("../Loading/Loading");

jest.mock("../Summary");
jest.mock("../Summary/Summary");

beforeAll(() => {
(window.confirm as jest.Mock).mockReturnValueOnce(true);
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Add from "../Add/index";
import Edit from "../Edit/index";
import Login from "../Login/index";
import UserButton from "../UserButton/index";
import Loading from "../Loading/index";
import Loading from "../Loading/Loading";
import { GlobalStyle, LogoLink, H1, Page, SmallLoading } from "./App.styles";
import useAuth from "../../hooks/use-auth";
import useDB from "../../hooks/use-db";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { User } from "firebase";
import { Redirect } from "react-router-dom";
import Add from "../Add/index";
import List from "../List/index";
import Summary from "../Summary/index";
import Summary from "../Summary/Summary";
import { Item } from "../../types";

interface Props {
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion src/components/Loading/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Summary/Summary.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { render } from "@testing-library/react";
import Summary from "./index";
import Summary from "./Summary";

test("return null if no item", () => {
const { container } = render(<Summary items={[]} />);
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 4f5333f

Please sign in to comment.