Files
clinicpro/vitest.config.mts
T
hamed 6084dc5d6b feat: add comprehensive tests for UI components, hooks, and API interactions
- Implement tests for Pagination, StatusBadge, ConfirmDialog, and MobileInput components.
- Add tests for useSubscription, usePaymentConfig, and usePwaInstall hooks.
- Create tests for API requests in the api module, including success and error handling.
- Add utility function tests for formatting and validating Iranian mobile numbers.
- Implement tests for BlogFormPage and BlogsPage to validate form submissions and data fetching.
- Add tests for LoginPage to ensure proper validation and state management.
- Create tests for authStore and uiStore to validate state management and functionality.
- Set up Vitest configuration and testing utilities for consistent testing environment.
2026-06-28 22:58:15 +03:30

26 lines
785 B
TypeScript

import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
plugins: [react(), tsconfigPaths({ ignoreConfigErrors: true })],
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./assets/admin/test/setup.ts'],
include: ['assets/admin/**/*.{test,spec}.{ts,tsx}'],
css: false,
clearMocks: true,
restoreMocks: true,
coverage: {
provider: 'v8',
include: ['assets/admin/**/*.{ts,tsx}'],
exclude: [
'assets/admin/**/*.{test,spec}.*',
'assets/admin/test/**',
'assets/admin/index.tsx',
],
},
},
});