feat: add configuration management system

This commit is contained in:
张翔
2026-03-06 12:05:51 +08:00
parent 66c868de03
commit c7686bf1a3
4 changed files with 173 additions and 0 deletions
@@ -0,0 +1,29 @@
import { TestConfig } from '../types';
export const environments: Record<string, TestConfig> = {
development: {
baseURL: 'http://localhost:3000',
timeout: 5000,
retries: 3,
environment: 'development',
headless: false
},
staging: {
baseURL: 'https://staging.novalon.com',
timeout: 10000,
retries: 2,
environment: 'staging',
headless: true
},
production: {
baseURL: 'https://www.novalon.com',
timeout: 10000,
retries: 1,
environment: 'production',
headless: true
}
};
export function getEnvironmentConfig(env: string = 'development'): TestConfig {
return environments[env] || environments.development;
}