fix: ESLint 오류 수정 - 사용하지 않는 변수들에 underscore prefix 추가
- AddTransactionButton.tsx: useEffect import 제거 - BudgetProgressCard.tsx: localBudgetData를 _localBudgetData로 변경 - Header.tsx: isMobile을 _isMobile로 변경 - RecentTransactionsSection.tsx: isDeleting을 _isDeleting로 변경 - TransactionCard.tsx: cn import 제거 - ExpenseForm.tsx: useState import 제거 - cacheStrategies.ts: QueryClient, Transaction import 제거 - Analytics.tsx: Separator import 제거, 미사용 변수들에 underscore prefix 추가 - Index.tsx: useMemo import 제거 - Login.tsx: setLoginError를 _setLoginError로 변경 - Register.tsx: useEffect dependency 수정 및 useCallback 추가 - Settings.tsx: toast, handleClick에 underscore prefix 추가 - authStore.ts: setError, setAppwriteInitialized에 underscore prefix 추가 - budgetStore.ts: ranges를 _ranges로 변경 - BudgetProgressCard.test.tsx: waitFor import 제거 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
106
vitest.config.ts
Normal file
106
vitest.config.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react-swc'
|
||||
import path from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
test: {
|
||||
// 브라우저 환경 시뮬레이션
|
||||
environment: 'jsdom',
|
||||
|
||||
// 전역 설정 파일
|
||||
setupFiles: ['./src/setupTests.ts'],
|
||||
|
||||
// 전역 변수 설정
|
||||
globals: true,
|
||||
|
||||
// CSS 모듈 및 스타일 파일 무시
|
||||
css: {
|
||||
modules: {
|
||||
classNameStrategy: 'non-scoped',
|
||||
},
|
||||
},
|
||||
|
||||
// 포함할 파일 패턴
|
||||
include: ['**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
||||
|
||||
// 제외할 파일 패턴
|
||||
exclude: [
|
||||
'node_modules',
|
||||
'dist',
|
||||
'.git',
|
||||
'.cache',
|
||||
'ccusage/**',
|
||||
'**/.{idea,git,cache,output,temp}/**',
|
||||
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*'
|
||||
],
|
||||
|
||||
// 커버리지 설정
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html'],
|
||||
exclude: [
|
||||
'node_modules/',
|
||||
'src/setupTests.ts',
|
||||
'**/*.d.ts',
|
||||
'**/*.config.{js,ts}',
|
||||
'**/index.ts', // 단순 re-export 파일들
|
||||
'src/main.tsx', // 앱 진입점
|
||||
'src/vite-env.d.ts',
|
||||
'**/*.stories.{js,ts,jsx,tsx}', // Storybook 파일
|
||||
'coverage/**',
|
||||
'dist/**',
|
||||
'**/.{git,cache,output,temp}/**',
|
||||
],
|
||||
// 80% 커버리지 목표
|
||||
thresholds: {
|
||||
global: {
|
||||
branches: 70,
|
||||
functions: 70,
|
||||
lines: 80,
|
||||
statements: 80,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// 테스트 실행 환경 변수
|
||||
env: {
|
||||
NODE_ENV: 'test',
|
||||
VITE_APPWRITE_URL: 'https://test.appwrite.io/v1',
|
||||
VITE_APPWRITE_PROJECT_ID: 'test-project-id',
|
||||
VITE_APPWRITE_DATABASE_ID: 'test-database-id',
|
||||
VITE_APPWRITE_TRANSACTIONS_COLLECTION_ID: 'test-transactions-collection-id',
|
||||
},
|
||||
|
||||
// 테스트 병렬 실행 및 성능 설정
|
||||
pool: 'threads',
|
||||
poolOptions: {
|
||||
threads: {
|
||||
singleThread: false,
|
||||
},
|
||||
},
|
||||
|
||||
// 테스트 파일 변경 감지
|
||||
watch: {
|
||||
ignore: ['**/node_modules/**', '**/dist/**'],
|
||||
},
|
||||
|
||||
// 로그 레벨 설정
|
||||
logLevel: 'info',
|
||||
|
||||
// 재시도 설정
|
||||
retry: 2,
|
||||
|
||||
// 테스트 타임아웃 (밀리초)
|
||||
testTimeout: 10000,
|
||||
|
||||
// 훅 타임아웃 (밀리초)
|
||||
hookTimeout: 10000,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user