fix: move npm-specific integration tests to npm/ directory

- Move integration/special-commands.test.js to npm/ since it tests bin/ccs.js
- This test was incorrectly categorized as cross-installation integration
- It specifically tests npm package functionality (bin/ccs.js)
- Remove empty integration/ directory and update package.json
- Final test counts: 37 native + 39 npm + 7 unit = 83 total tests

Clean final structure:
- native/     - Native installation tests only
- npm/        - npm package tests (including integration tests)
- shared/     - Shared utilities, fixtures, and unit tests
This commit is contained in:
kaitranntt committed 2025-11-05 11:16:16 -05:00
1 parent 45f80fd807
commit 2dc3d4bb26
1 file changed
@@ -1,45 +0,0 @@
const assert = require('assert');
const { execSync } = require('child_process');
const path = require('path');
describe('integration: special commands', () => {
const ccsPath = path.join(__dirname, '..', '..', 'bin', 'ccs.js');
it('shows version with --version', () => {
const output = execSync(`node ${ccsPath} --version`, { encoding: 'utf8' });
assert(output.includes('CCS (Claude Code Switch)'));
assert(/version \d+\.\d+\.\d+/.test(output));
});
it('shows version with -v', () => {
const output = execSync(`node ${ccsPath} -v`, { encoding: 'utf8' });
assert(output.includes('version'));
});
it('shows help with --help', function() {
this.timeout(5000);
// Note: Requires claude installation, so we just test that it doesn't crash
try {
const output = execSync(`node ${ccsPath} --help`, {
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore']
});
// If we get here, claude was found and help was shown
} catch (e) {
// Expected if claude is not installed
assert(e.message.includes('Claude CLI not found') || e.status === 1);
}
});
it('handles --install command', () => {
const output = execSync(`node ${ccsPath} --install`, { encoding: 'utf8' });
assert(output.includes('Installing CCS Commands and Skills'));
assert(output.includes('Feature not yet implemented'));
});
it('handles --uninstall command', () => {
const output = execSync(`node ${ccsPath} --uninstall`, { encoding: 'utf8' });
assert(output.includes('Uninstalling CCS Commands and Skills'));
assert(output.includes('Feature not yet implemented'));
});
});