con un clic
cli-tests
Run CLI tests with focus on unit, integration, and E2E testing patterns.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Run CLI tests with focus on unit, integration, and E2E testing patterns.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Design guidance for charts, graphs, dashboards, maps, and data visualizations, including a local palette validator.
Review changed code for correctness, security, code quality, and performance. Use when the user asks to review code changes, a PR, or specific files. Invoke with `/review`, `/review <pr-number>`, `/review <file-path>`, or `/review <pr-number> --comment` to post inline comments on the PR. Add `--effort low|medium|high` to trade depth for speed (defaults to high for PRs, medium for local changes).
Use when Qwen Code Autofix runs from GitHub Actions or an operator dry-run to choose an approved issue, implement it, or address review feedback on an existing autofix PR.
Classify a bounded batch of stale PR CI failures and choose the safest response.
Gatekeep and review GitHub issues and pull requests for Qwen Code maintainers. Use for GitHub Action issue triage, PR admission checks, product-direction review, KISS-focused PR review, and staged bilingual GitHub comments.
Create pixel-art desktop pet companions for Qwen Code. Generates a customized chibi spritesheet (1536×1872, 8×9 grid) for any character the user names — F1 drivers, anime characters, celebrities, fictional characters, animals, etc. Use when the user says "desktop pet", "桌宠", "桌面宠物", "想要XXX当桌宠", "换个宠物", or similar.
| name | cli-tests |
| description | Run CLI tests with focus on unit, integration, and E2E testing patterns. |
How to run end-to-end, integration, and E2E tests of the Qwen Code CLI. Use this skill when you need to verify CLI behavior, reproduce bugs end-to-end, or run the full test suite.
The CLI has three layers of testing, with different purposes and expected times:
packages/cli/src/**/*.test.tsintegration-tests/cd packages/cli && npx vitest run --reporter=verbose 2>&1 | tee /tmp/test.log
packages/cli/src/src/tools/edit.test.ts — file permission checks don't apply to rootsrc/utils/pathReader.test.ts — same permission issue# Unit tests only
cd packages/cli && npx vitest run --reporter=verbose src/tools/edit.test.ts
# Integration tests
npm run test:integration:cli:sandbox:none
# Terminal benchmark tests
npm run test:terminal-bench
# SDK integration tests
npm run test:sdk:python
cd packages/cli && npx vitest run --reporter=verbose 2>&1 | tee /tmp/test.log
Before running tests:
Verify Node.js version (>= 22.0.0 required):
node --version
Install dependencies if needed:
npm install
Build the project (required for some tests):
npm run build
npm run bundle
Check for expected root-user failures:
edit.test.ts and pathReader.test.tsThree sandbox modes are available in integration-tests/:
npm run test:integration:cli:sandbox:nonenpm run test:integration:cli:sandbox:docker)npm run test:integration:cli:sandbox:podman)For TUI rendering and keyboard interaction tests:
cd integration-tests && \
cross-env QWEN_SANDBOX=false npx vitest run cli interactive
Tests produce structured JSON. Key assertions use patterns:
FILE_WRITE_FAILURE on write errors"No matching export" — stale .js files in src/:
find packages/*/src -name "*.ts" -o -name "*.tsx" \
| sed 's/\.ts$//; s/\.tsx$//' \
| while read -r base; do rm -f "${base}.js" "${base}.js.map"; done
ERR_MODULE_NOT_FOUND — imports from @opentelemetry/api must be relative:
grep -rn "from '@opentelemetry" packages/core/src/ --include="*.ts"
Permission test failures — running as root bypasses checks:
src/tools/edit.test.ts — expected failuresrc/utils/pathReader.test.ts — expected failureTimeout on test suite — reduce timeout:
npm run build && npm run bundle && \
QWEN_SANDBOX=false npx vitest run 2>&1 | tee /tmp/test.log
Snapshot failures — update snapshots for behavioral changes:
cd packages/cli && npx vitest run src/path/to/file.test.ts --update
npx vitest run --parallelnpm run test -- --filter=...--reporter=verbose for detailed output in debug mode<qwen> to write tests, not for actual TUI testing