forked from benleane83/ghec-sso-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-cli.js
More file actions
28 lines (22 loc) · 945 Bytes
/
test-cli.js
File metadata and controls
28 lines (22 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env node
// Simple test script to verify the CLI works
const { execSync } = require('child_process');
const path = require('path');
console.log('🧪 Testing GHEC SSO CLI...\n');
try {
// Build the project
console.log('📦 Building project...');
execSync('npm run build', { stdio: 'inherit' });
// Test help command
console.log('\n📋 Testing help command...');
execSync('node dist/index.js --help', { stdio: 'inherit' });
console.log('\n✅ CLI test completed successfully!');
console.log('\n🚀 To use the CLI:');
console.log(' npm link # Install globally for testing');
console.log(' ghec-sso --help # See all commands');
console.log(' ghec-sso auth login # Start with authentication');
console.log(' ghec-sso setup # Run the setup wizard');
} catch (error) {
console.error('\n❌ Test failed:', error.message);
process.exit(1);
}