Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
fix: tu
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgfr committed Mar 4, 2022
1 parent bb60d60 commit 61a9ac5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions jest-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "@testing-library/jest-dom";
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const customJestConfig = {
"@modules": "<rootDir>/src/modules",
"@lib": "<rootDir>/src/lib",
},
setupFilesAfterEnv: ["<rootDir>/jest-setup.ts"],
};

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "next start",
"lint": "next lint",
"export": "next export",
"build:export": "next build && next export",
"build:export": "npm run build && npm run export",
"e2e": "cypress open",
"e2e:headless": "cypress run",
"test": "jest",
Expand Down
4 changes: 2 additions & 2 deletions src/components/footer/__tests__/bottom.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from "@testing-library/react";
import { Bottom } from "../bottom";

describe("Bottom", () => {
describe("Footer - Bottom", () => {
it("renders version", async () => {
const version = "1.0.0";
render(
Expand All @@ -12,6 +12,6 @@ describe("Bottom", () => {
links={[{ href: "/", title: "Yo" }]}
/>
);
expect(screen.getByText(version)).toBeDefined();
expect(screen.getByText(/Version/i)).toHaveTextContent(version);
});
});
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@lib": ["./src/lib"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "jest-setup.ts"],
"exclude": [
"node_modules",
"next-sitemap.js",
Expand Down

0 comments on commit 61a9ac5

Please sign in to comment.