@@ -1,17 +0,0 @@
-import nextJest from "next/jest";
-
-const createJestConfig = nextJest({
- // Provide the path to your Next.js app to load next.config.js and .env files in your test environment
- dir: "./",
-});
-// Add any custom config to be passed to Jest
-const customJestConfig = {
- setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
- testEnvironment: "jsdom",
- moduleDirectories: ["node_modules", "src"],
- modulePaths: ["<rootDir>"],
-};
-// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
-module.exports = createJestConfig(customJestConfig);
@@ -1,5 +0,0 @@
-// Optional: configure or set up a testing framework before each test.
-// If you delete this file, remove `setupFilesAfterEnv` from `jest.config.js`
-// Used for __tests__/testing-library.js
-// Learn more: https://github.com/testing-library/jest-dom
-import "@testing-library/jest-dom/extend-expect";
@@ -8,7 +8,7 @@
"dev": "next dev",
"build": "next build && next export",
"start": "next start",
- "lint": "next lint",
+ "lint": "tsc && next lint",
"lint:fix": "prettier --write \"./**/*.{ts,tsx,json}\"",
"deploy": "gh-pages -d out -t true"
},
@@ -1,10 +0,0 @@
-import React from "react";
-import { screen, render } from "@testing-library/react";
-import { Button } from "src/components/Button";
-describe("Button", () => {
- it("should render Button component", () => {
- render(<Button>Click Me!</Button>);
- expect(screen.getByRole("button", { name: /Click Me/ })).toBeInTheDocument();
- });