Browse Source

remove tests

AykutSarac 2 years ago
parent
commit
fc77fbcaa1
4 changed files with 1 additions and 33 deletions
  1. 0 17
      jest.config.ts
  2. 0 5
      jest.setup.ts
  3. 1 1
      package.json
  4. 0 10
      src/components/__tests__/Button.test.tsx

+ 0 - 17
jest.config.ts

@@ -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);

+ 0 - 5
jest.setup.ts

@@ -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";

+ 1 - 1
package.json

@@ -8,7 +8,7 @@
     "dev": "next dev",
     "dev": "next dev",
     "build": "next build && next export",
     "build": "next build && next export",
     "start": "next start",
     "start": "next start",
-    "lint": "next lint",
+    "lint": "tsc && next lint",
     "lint:fix": "prettier --write \"./**/*.{ts,tsx,json}\"",
     "lint:fix": "prettier --write \"./**/*.{ts,tsx,json}\"",
     "deploy": "gh-pages -d out -t true"
     "deploy": "gh-pages -d out -t true"
   },
   },

+ 0 - 10
src/components/__tests__/Button.test.tsx

@@ -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();
-  });
-});