mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-03-27 09:45:53 +00:00
- Add comprehensive integration test suite for Node.js server - API endpoint tests for session lifecycle, I/O operations, file system - WebSocket connection tests for hot reload functionality - Server lifecycle tests for initialization and shutdown - Basic binary availability tests for tty-fwd - Fix Rust code for nix 0.30 API changes - Update dup2 calls to use OwnedFd instead of raw file descriptors - Fix read calls to pass file descriptors directly instead of raw fd - Remove deprecated as_raw_fd() calls where not needed - Reorganize test structure - Split tests into unit/ and integration/ directories - Add separate Vitest configuration for integration tests - Create test utilities and setup files for both test types - Add custom test matchers for session validation - Update test coverage configuration - Configure separate coverage for unit and integration tests - Add proper test timeouts for long-running integration tests - Use fork pool for integration tests to avoid port conflicts
41 lines
No EOL
847 B
TypeScript
41 lines
No EOL
847 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html', 'lcov'],
|
|
exclude: [
|
|
'node_modules/',
|
|
'src/test/',
|
|
'dist/',
|
|
'public/',
|
|
'*.config.ts',
|
|
'*.config.js',
|
|
'**/*.test.ts',
|
|
'**/*.spec.ts',
|
|
],
|
|
include: [
|
|
'src/**/*.ts',
|
|
'src/**/*.js',
|
|
],
|
|
all: true,
|
|
lines: 80,
|
|
functions: 80,
|
|
branches: 80,
|
|
statements: 80,
|
|
},
|
|
testTimeout: 10000,
|
|
// Separate test suites
|
|
includeSource: ['src/**/*.{js,ts}'],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
}); |