Files
claude-hub/test/test-direct.js
Jonathan Flatt 2ab13ac736 feat: Update ESLint to v9 and fix linting issues
- Convert .eslintrc.js to eslint.config.js (ESLint v9 format)
- Add global definitions for fetch and URL
- Fix unused variables automatically via ESLint auto-fix
- Configure proper unused variable detection patterns
- All tests passing with good coverage (28 passed, 1 skipped)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 14:13:22 -05:00

31 lines
940 B
JavaScript

const { execSync } = require('child_process');
// Simple test script for Docker container execution
const containerName = `claude-test-${Date.now()}`;
console.log('Running test container...');
try {
// Execute a simple echo command in the container
const dockerCommand = `docker run --rm --name ${containerName} claudecode:latest "echo 'This is a test from container'"`;
console.log('Docker command:', dockerCommand);
const result = execSync(dockerCommand);
console.log('Container output:');
console.log(result.toString());
console.log('Test completed successfully!');
} catch (error) {
console.error('Error running container:', error.message);
if (error.stdout) console.log('stdout:', error.stdout.toString());
if (error.stderr) console.log('stderr:', error.stderr.toString());
// Try to clean up the container
try {
execSync(`docker rm ${containerName}`);
} catch {
// Ignore cleanup errors
}
}