Files
ccs/tests/npm
kaitranntt 72c2b08715 refactor: consolidate test structure and remove backup files
- Move ux-integration-test.sh to tests/integration/ directory
- Consolidate tests/fixtures/ into tests/shared/fixtures/
- Fix import paths in cli.test.js and postinstall.test.js
- Remove src/ccs.ts.backup file (958 lines)
- Remove empty src/scripts/ directory
- Remove non-existent test:edge-cases script from package.json
- Update tests/README.md with accurate structure
- Update CONTRIBUTING.md with correct test commands
- Update docs/system-architecture.md with correct test paths
2025-11-30 17:54:04 -05:00
..

npm Package Tests

Tests for npm installation method of CCS.

Files

  • postinstall.test.js - Postinstall behavior and configuration creation
  • cli.test.js - CLI argument parsing and profile handling
  • cross-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