64 lines
2.6 KiB
TypeScript
64 lines
2.6 KiB
TypeScript
import path from 'node:path';
|
|
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
// Keep shared components' application-root imports resolvable in tests.
|
|
'@': path.resolve(__dirname, '.'),
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'node',
|
|
globals: true,
|
|
minThreads: 1,
|
|
maxThreads: 8,
|
|
include: [
|
|
'src/index.test.ts',
|
|
'src/routing/activeAppPageRoutes.test.ts',
|
|
'src/routing/activeAppRoutes.test.ts',
|
|
'src/services/activeAppTitle.test.ts',
|
|
'src/services/authService.test.ts',
|
|
'src/services/apiClient.test.ts',
|
|
'src/services/clipboard.test.ts',
|
|
'src/services/host-bridge/**/*.test.ts',
|
|
'src/services/image-editor/**/*.test.ts',
|
|
'src/services/external-generation/**/*.test.ts',
|
|
'src/services/payment/**/*.test.ts',
|
|
'src/components/auth/**/*.test.ts',
|
|
'src/components/auth/**/*.test.tsx',
|
|
'src/components/creation-home/**/*.test.ts',
|
|
'src/components/creation-home/**/*.test.tsx',
|
|
'src/components/image-editor/**/*.test.ts',
|
|
'src/components/image-editor/**/*.test.tsx',
|
|
'src/components/project/**/*.test.ts',
|
|
'src/components/project/**/*.test.tsx',
|
|
'src/components/platform-entry/PlatformActiveProfileView.test.tsx',
|
|
'src/components/platform-entry/PlatformEntryActiveFlowShell.test.tsx',
|
|
'src/components/platform-entry/PlatformProfileModalShell.test.tsx',
|
|
'src/components/platform-entry/PlatformProfileQrScannerModal.test.tsx',
|
|
'src/components/platform-entry/PlatformProfileRechargeModal.test.tsx',
|
|
'src/components/platform-entry/PlatformProfileReferralModal.test.tsx',
|
|
'src/components/platform-entry/PlatformProfileRewardCodeRedeemModal.test.tsx',
|
|
'src/components/platform-entry/PlatformProfileTaskCenterModal.test.tsx',
|
|
'src/components/platform-entry/PlatformProfileWalletLedgerModal.test.tsx',
|
|
'src/components/platform-entry/platformProfile*.test.ts',
|
|
'src/components/platform-entry/usePlatformProfileCenterController.test.tsx',
|
|
'src/hooks/useHostNavigationCanGoBack.test.tsx',
|
|
'apps/admin-web/src/**/*.test.ts',
|
|
'apps/admin-web/src/**/*.test.tsx',
|
|
'miniprogram/**/*.test.js',
|
|
'scripts/**/*.test.ts',
|
|
'packages/shared/src/contracts/hostBridge.test.ts',
|
|
'packages/shared/src/components/**/*.test.ts',
|
|
'packages/shared/src/components/**/*.test.tsx',
|
|
'packages/shared/src/utils/**/*.test.ts',
|
|
],
|
|
exclude: [
|
|
'apps/admin-web/src/pages/AdminCreationEntrySwitchPage.test.tsx',
|
|
'scripts/loadtest/**',
|
|
],
|
|
},
|
|
});
|