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
+9 -2
View File
@@ -7,7 +7,8 @@
"dev": "vite --host",
"build": "vite build",
"lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"test": "vitest"
},
"dependencies": {
"@dnd-kit/core": "^6.0.8",
@@ -35,11 +36,17 @@
"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",
"vite": "^4.3.9"
"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", () => {
})
+8 -3
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()],
})
test: {
globals: true,
environment: "jsdom",
setupFiles: "./setupTests.js",
},
});