mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-15 22:21:20 +00:00
- Move fixtures/ and unit/ to shared/ directory where they belong - These test resources are used by both npm and native installations - Update package.json test scripts to use new paths - Fix relative import path in helpers.test.js - All 46 npm-based tests now passing (7 unit + 5 integration + 34 npm) Final test structure: - native/ - Native installation tests only - npm/ - npm package tests only - shared/ - Shared utilities, fixtures, and unit tests - integration/- Cross-installation integration tests - edge-cases.sh/.ps1 - Master orchestrators
CCS Test Suite
Organization
native/- Traditional installation (curl|bash, irm|iex)unix/- Unix/Linux/macOS native testswindows/- Windows PowerShell tests
npm/- npm package testspostinstall.test.js- Postinstall behavior testscli.test.js- CLI argument parsing testscross-platform.test.js- Cross-platform compatibility tests
unit/- Node.js unit testsintegration/- Integration testsshared/- Shared utilities and test data
Running Tests
- All tests:
npm test - npm package tests only:
npm run test:npm - Native installation tests only:
npm run test:native - Unit tests only:
npm run test:unit - Integration tests only:
npm run test:integration - Master test suite (backward compatible):
npm run test:edge-cases
Test Structure
Native Tests
Test the traditional installation methods where CCS is installed via:
- Unix/Linux/macOS:
curl | bash - Windows:
irm | iex(PowerShell)
These tests use bash/PowerShell scripts and test the lib/ccs and lib/ccs.ps1 files.
npm Tests
Test the npm package installation where CCS is installed via:
- npm:
npm install -g @kaitranntt/ccs
These tests use Node.js/mocha framework and test the bin/ccs.js file.
Shared Utilities
Common test code, data, and helper functions are stored in shared/ to avoid duplication across test suites.