MCP HubMCP Hub
Volver a habilidades

testing-clickup-cli

krodak
Actualizado 2 days ago
3 vistas
72
11
72
Ver en GitHub
Pruebasaitestingdata

Acerca de

Esta habilidad gestiona las pruebas para el proyecto clickup-cli, manejando tanto pruebas unitarias con dependencias simuladas como pruebas de extremo a extremo contra un espacio de trabajo de ClickUp activo. Se utiliza para ejecutar conjuntos de pruebas, depurar fallos y configurar accesorios o datos de prueba. Los desarrolladores deben usarla cuando trabajen en la cobertura de pruebas, verifiquen el comportamiento de la CLI o preparen el entorno de pruebas.

Instalación rápida

Claude Code

Recomendado
Principal
npx skills add krodak/clickup-cli -a claude-code
Comando PluginAlternativo
/plugin add https://github.com/krodak/clickup-cli
Git CloneAlternativo
git clone https://github.com/krodak/clickup-cli.git ~/.claude/skills/testing-clickup-cli

Copia y pega este comando en Claude Code para instalar esta habilidad

Documentación

Test Suite Overview

SuiteCommandFilesWhat it tests
Unitnpm testtests/unit/**/*.test.tsAll commands, API client, formatters, config. Mocks ClickUpClient.
E2Enpm run test:e2etests/e2e/**/*.e2e.tsReal API calls against a live ClickUp workspace.

Unit tests run in CI. E2E tests require CLICKUP_API_TOKEN in .env.test and are not part of CI.

Running Tests

npm test                          # all unit tests
npm test -- tests/unit/commands/  # just command tests
npm test -- -t "sprint"           # filter by test name
npm run test:e2e                  # e2e tests (needs .env.test)

The unit test global setup runs npm run build before tests start.

E2E Test Workspace

Tests run against the personal ClickUp workspace (profile: personal).

Space: E2E Tests (90166622768)

Pre-populated with test fixtures:

FixtureWhat it contains
Sprints folder3 sprint lists with (M/DD - M/DD) date ranges. Sprint 2 is "current".
Backlog listGeneral tasks for CRUD testing. E2E lifecycle tests create/delete tasks here.
Tasks11 tasks with varied statuses, priorities, assignees, due dates, tags.
Subtasks3 subtasks under "Implement user authentication".
Checklist"CI Steps" with 5 items (3 resolved).
Tagsbackend, frontend, security, design, bug.
Comments2 comments on the auth task.
Dependencies"Design landing page" depends on "Set up CI pipeline".
Overdue task"Fix login redirect bug" in Sprint 1 with past due date.

Space: ClickUp CLI (90166622769)

Project tracking space. Not used for tests - used for tracking releases and features.

E2E Test Patterns

Lifecycle tests (tests/e2e/lifecycle.e2e.ts)

These create test data, verify operations, and clean up:

SuiteTestsCoverage
Task lifecycle13Create, read, update, subtask, comment, checklist, delete, confirm gone
Tag lifecycle4Add tag, verify, remove, verify removed
Time tracking5Start timer, check running, stop, log entry, list entries

Each suite uses beforeAll to find the Backlog list and afterAll to clean up created tasks.

API tests (tests/e2e/api.e2e.ts)

Tests API client methods directly: getSpaces, getLists, getTask, sprint detection.

Unit Test Patterns

Mocking ClickUpClient

Every command test mocks the API client with vi.mock:

const mockGetTask = vi.fn().mockResolvedValue({ id: 't1', name: 'Task' })

vi.mock('../../../src/api.js', () => ({
  ClickUpClient: vi.fn().mockImplementation(function () {
    return { getTask: mockGetTask }
  }),
}))

The function keyword (not arrow) is required for Vitest 4's new semantics.

Testing command functions

Commands export pure functions. Tests import and call them directly:

const { updateTask } = await import('../../../src/commands/update.js')
await updateTask({ apiToken: 'pk_t', teamId: 'team1' }, 't1', { status: 'done' })
expect(mockUpdateTask).toHaveBeenCalledWith('t1', { status: 'done' })

Metadata sync test

tests/unit/commands/completion.test.ts verifies that:

  1. Every command registered in Commander is listed in src/commands/metadata.ts
  2. The docs/commands.md quick reference section matches what metadata generates

If you add a new command, you MUST add it to metadata.ts. If you add new flags, add them too. Then run node --import tsx scripts/sync-command-docs.ts to regenerate the docs.

Adding New Tests

New unit test

  1. Create tests/unit/commands/<name>.test.ts
  2. Mock ClickUpClient with the methods your command uses
  3. Test happy path, error cases, edge cases
  4. Run npm test -- tests/unit/commands/<name>.test.ts

New e2e test

  1. Add to tests/e2e/lifecycle.e2e.ts or create a new *.e2e.ts file
  2. Use the Backlog list in E2E Tests space for creating test data
  3. Always clean up: delete created tasks/checklists in afterAll
  4. Use describe.skipIf(!TOKEN) to skip when no API token is set
  5. Run npm run test:e2e

Config for E2E

# .env.test (gitignored)
CLICKUP_API_TOKEN=pk_...   # personal workspace token

Copy from .env.test.example and fill in your token.

Repositorio GitHub

krodak/clickup-cli
Ruta: .agents/skills/testing-clickup-cli
0
ai-agentsclaude-codecliclickupcodexdeveloper-tools

Habilidades relacionadas

evaluating-llms-harness

Pruebas

Esta Skill de Claude ejecuta el benchmark lm-evaluation-harness para evaluar modelos de lenguaje en más de 60 tareas académicas estandarizadas como MMLU y GSM8K. Está diseñada para que los desarrolladores comparen la calidad de los modelos, realicen seguimiento del progreso del entrenamiento o reporten resultados académicos. La herramienta admite varios backends, incluidos modelos de HuggingFace y vLLM.

Ver habilidad

cloudflare-cron-triggers

Pruebas

Esta habilidad proporciona conocimiento integral para implementar Cron Triggers de Cloudflare y programar Workers mediante expresiones cron. Cubre la configuración de tareas periódicas, trabajos de mantenimiento y flujos de trabajo automatizados, manejando problemas comunes como expresiones cron inválidas y inconvenientes de zonas horarias. Los desarrolladores pueden utilizarla para configurar manejadores programados, probar activadores cron e integrar con Workflows y Green Compute.

Ver habilidad

webapp-testing

Pruebas

Esta habilidad de Claude proporciona un kit de herramientas basado en Playwright para probar aplicaciones web locales mediante scripts de Python. Permite verificación de frontend, depuración de interfaz de usuario, captura de pantallas y visualización de registros, mientras gestiona los ciclos de vida del servidor. Úsela para tareas de automatización de navegadores, pero ejecute los scripts directamente en lugar de leer su código fuente para evitar contaminación del contexto.

Ver habilidad

finishing-a-development-branch

Pruebas

Esta habilidad ayuda a los desarrolladores a completar el trabajo terminado verificando que las pruebas pasen y luego presentando opciones estructuradas de integración. Guía el flujo de trabajo para fusionar, crear PRs o limpiar ramas después de que se completa la implementación. Úsala cuando tu código esté listo y probado para finalizar sistemáticamente el proceso de desarrollo.

Ver habilidad