1. 설치하기
npm add -D vitest
  1. script 추가
//package.json
"scripts"{
...
// 이거 추가하기
"test": "vitest",
"test:run": "vitest run",
}
  1. Vitest의 설정을 추가하려면
//vite.config.ts
/// <reference types="vitest/config" /> -> 맨 위에 추가하기

// 이 항목 추가하기
test: {
	globals: true, //it, test, describe를 그냥 쓸 수 있게 해줌
},
  1. jest에서 쓰는 @testing-library/jest-dom 설치해야 함
npm i @testing-library/jest-dom