Files
ccs/tests/npm
kaitranntt 6838ac0fa1 test(uninstall): add hook cleanup tests
- add Section 7: SETTINGS.JSON HOOK CLEANUP tests

- test CCS hook removal from settings.json

- test user-defined hooks preserved

- test mixed CCS and user hooks handling

- test missing settings.json handling

- update special-commands.test.js expectations
2026-01-25 20:05:58 -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