platform-codebase/@packages/@testing/test-utils/vitest-presets/node.preset.ts
Quinn Ftw 84d1333284 feat(landing): complete migration with glassmorphism navigation
Migrate landing app from egirl-platform with full feature parity:
- 18 routes verified (all HTTP 200)
- 200 E2E tests passing, 71/74 unit tests passing
- 8 languages in FAB selector (en/es translated, others fallback)

Add ThemeProvider to App.tsx for styled-components theme context.
Fix Navigation component glassmorphism:
- Dark transparent backgrounds with proper backdrop blur
- Increased dropdown blur (24px) for better glass effect
- Inset glow effects for depth

Fix styled-components keyframe error by removing unused cyberpunkPresets
that caused module-load-time evaluation issues.

Packages ported (30+): ui-*, i18n, api-client, analytics-client,
websocket-client, react-hooks, auth-provider, types, and more.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:11:07 -08:00

54 lines
1.4 KiB
TypeScript

import type { UserConfig } from 'vite'
import { createPreset } from './base.preset'
/**
* Vitest preset for Node.js packages
*
* Configures tests to run in Node environment without DOM APIs.
* Suitable for backend utilities, algorithms, business logic packages.
*
* **Default Configuration:**
* - Environment: Node.js (no DOM)
* - Test files: `src/**\/*.{test,spec}.ts`
* - Globals: enabled (describe, it, expect available without import)
* - Timeout: 10s
* - Coverage: v8 provider with text/json/html reports
*
* @example Basic usage
* ```typescript
* // vitest.config.ts
* import { nodePreset } from '@lilith/test-utils/vitest-presets'
*
* export default nodePreset()
* ```
*
* @example With custom timeout
* ```typescript
* export default nodePreset({
* test: {
* testTimeout: 20000, // 20s for slow tests
* }
* })
* ```
*
* @example With custom include patterns
* ```typescript
* export default nodePreset({
* test: {
* include: ['tests/**\/*.test.ts'], // Different test directory
* }
* })
* ```
*
* **Use Cases:**
* - `@packages/algorithms` - Pure computation, no DOM
* - `@packages/crypto-tools` - Node crypto APIs
* - `@packages/business-logic` - Business rules, no UI
* - Backend utility packages
*/
export const nodePreset = createPreset({
test: {
environment: 'node',
include: ['src/**/*.test.ts', 'src/**/*.spec.ts'],
},
} as UserConfig)