깃허브 링크
npm install --save-dev nock
npm install --save-dev jest @types/jest ts-jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom
// package.json
"scripts": {
"unit-test": "jest --watchAll"
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "jest-environment-jsdom"
},
npm install --save-dev cypress
"scripts": {
...
"cypress": "npx cypress open",
...
},
export default defineConfig({
e2e: {
baseUrl: "http://localhost:5173",
...
},
});
npx storybook@latest init