npm install -D prettier eslint-plugin-prettier
npm install vitest jsdom @testing-library/react @testing-library/jest-dom vitest jsdom @testing-library/react @testing-library/jest-dom -D
Add "test" script to package.json: Open your package.json file and add the following line to the "scripts" section:
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "vitest"
}
npm run test
or
npm test