Cover core networking: connect/disconnect, challenge handshake, event routing, request/response, error handling, timeout, reconnect behavior, and credential updates. Adds __APP_VERSION__ define to vitest.config.ts for test env. Total test count: 95 → 107.
20 lines
523 B
TypeScript
20 lines
523 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify('0.0.0-test'),
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
include: ['src/**/__tests__/**/*.test.{ts,tsx}'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'text-summary', 'json-summary'],
|
|
include: ['src/lib/**/*.ts'],
|
|
exclude: ['src/lib/__tests__/**'],
|
|
// Thresholds intentionally unset — coverage is tracked, not enforced yet.
|
|
},
|
|
},
|
|
})
|