Files
ccs/tests/npm
semantic-release-botandkaitranntt bd46c8de12 fix(tests): migrate test suite from mocha to bun test runner
- Replace before()/after() with beforeAll()/afterAll()
- Remove this.timeout() calls (unsupported by bun)
- Update package.json scripts to use bun test
- Fix error message regex for cross-runtime compatibility
- Skip integration tests requiring network/child process mocking
- Format source files with prettier
2025-12-03 21:43:29 -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