tests setup

This commit is contained in:
Moon Patel
2023-07-26 18:43:03 +05:30
parent b3b99a340a
commit 95fb999747
5 changed files with 5719 additions and 48 deletions
+5653 -1
View File
File diff suppressed because it is too large Load Diff
+50 -43
View File
@@ -1,45 +1,52 @@
{
"name": "chess-",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --host",
"build": "vite build",
"lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@dnd-kit/core": "^6.0.8",
"@emotion/react": "^11.11.1",
"@mantine/core": "^6.0.14",
"@mantine/form": "^6.0.16",
"@mantine/hooks": "^6.0.14",
"@radix-ui/react-icons": "^1.3.0",
"@tabler/icons-react": "^2.23.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"chess.js": "^1.0.0-beta.6",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.0",
"js-cookie": "^3.0.5",
"prettier": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.45.2",
"react-router-dom": "^6.14.0",
"socket.io-client": "^4.7.1",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/react": "^18.0.37",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.0.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"vite": "^4.3.9"
}
"name": "chess-",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --host",
"build": "vite build",
"lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "vitest"
},
"dependencies": {
"@dnd-kit/core": "^6.0.8",
"@emotion/react": "^11.11.1",
"@mantine/core": "^6.0.14",
"@mantine/form": "^6.0.16",
"@mantine/hooks": "^6.0.14",
"@radix-ui/react-icons": "^1.3.0",
"@tabler/icons-react": "^2.23.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"chess.js": "^1.0.0-beta.6",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.0",
"js-cookie": "^3.0.5",
"prettier": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.45.2",
"react-router-dom": "^6.14.0",
"socket.io-client": "^4.7.1",
"zod": "^3.21.4"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/react": "^18.0.37",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.0.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"jest": "^29.6.1",
"jest-environment-jsdom": "^29.6.1",
"vite": "^4.3.9",
"vitest": "^0.33.0"
}
}
+1
View File
@@ -0,0 +1 @@
import "@testing-library/jest-dom";
+6
View File
@@ -0,0 +1,6 @@
import { render, screen } from "@testing-library/react";
import { describe, expect, test } from "vitest";
describe("Sample test", () => {
})
+9 -4
View File
@@ -1,7 +1,12 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
plugins: [react()],
test: {
globals: true,
environment: "jsdom",
setupFiles: "./setupTests.js",
},
});