Skip to main content
Glama

Cut-Copy-Paste Clipboard Server

cli.test.ts•1.85 kB
import { exec } from 'child_process'; import { promisify } from 'util'; import path from 'path'; import fs from 'fs'; import { fileURLToPath } from 'url'; import { dirname } from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const execAsync = promisify(exec); describe('CLI', () => { const cliPath = path.join(__dirname, '../../dist/cli.js'); describe('Help and Version', () => { test('should display help when --help flag is provided', async () => { // This test will fail until CLI is implemented try { const { stdout } = await execAsync(`node ${cliPath} --help`); expect(stdout).toContain('cut-copy-paste-mcp'); expect(stdout).toContain('Usage:'); } catch (error) { // Expected to fail in RED phase expect(error).toBeDefined(); } }, 10000); test('should display version when --version flag is provided', async () => { // This test will fail until CLI is implemented try { const { stdout } = await execAsync(`node ${cliPath} --version`); expect(stdout).toContain('1.0.0'); } catch (error) { // Expected to fail in RED phase expect(error).toBeDefined(); } }, 10000); }); describe('Server Startup', () => { test('CLI file should exist after build', () => { // This will fail until we build const exists = fs.existsSync(cliPath); expect(exists).toBe(true); }); test('CLI file should have executable shebang', () => { // This will fail until CLI is created if (fs.existsSync(cliPath)) { const content = fs.readFileSync(cliPath, 'utf-8'); expect(content.startsWith('#!/usr/bin/env node')).toBe(true); } else { expect(fs.existsSync(cliPath)).toBe(true); } }); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pr0j3c7t0dd-Ltd/cut-copy-paste-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server