mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 18:16:08 +00:00
- Update postinstall.js to create config.yaml instead of config.json - Update recovery-manager to create config.yaml as primary config - Fix isFirstTimeInstall() to check for meaningful config content (profiles, accounts, variants, oauth_accounts, remote proxy) - Update validation to accept config.yaml OR config.json - Preserve backward compatibility: legacy config.json is migrated to config.yaml on first run via autoMigrate() - Update postinstall tests to verify config.yaml creation Fixes #142 - remote CLIProxyAPI configuration
npm Package Tests
Tests for npm installation method of CCS.
Files
postinstall.test.js- Postinstall behavior and configuration creationcli.test.js- CLI argument parsing and profile handlingcross-platform.test.js- Cross-platform compatibility tests
Running
# Run only npm tests
npm run test:npm
# Run with verbose output
npm run test:npm -- --reporter spec
# Run specific test file
npx mocha tests/npm/postinstall.test.js
Test Coverage
These tests cover:
- Postinstall script behavior (Section 10 from original edge-cases.sh)
- CLI argument parsing for npm package
- Cross-platform path handling
- Configuration file creation and management
- Profile system functionality