axm-testing-e2e

Run CLI end-to-end tests for co-located and distribution scenarios with Vitest.

5|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/agentxm/axm --skill axm-testing-e2e
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axm-testing-e2e
Source: https://github.com/agentxm/axm/tree/main/.claude/skills/axm-testing-e2e
Command: npx skills add https://github.com/agentxm/axm --skill axm-testing-e2e

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to end-to-end testing of CLI tools, covering both dev-time co-located tests and distribution-based tests to ensure reliable CLI behavior.

Core Features & Use Cases

  • Co-located E2E Tests: dev-time tests located under packages/cli/src/**/*.e2e.test.ts that exercise command handlers via runtime execution using bun run.
  • Distribution E2E Tests: tests validating built artifacts under packages/cli-spike-e2e/, ensuring the final CLI behaves as expected after bundling.
  • Test Utilities: shared helpers for creating temp dirs, spawning the CLI, and asserting exit codes.

Quick Start

Run the end-to-end test suite to validate CLI behavior across development and build environments.

Frequently Asked Questions about axm-testing-e2e

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run end-to-end CLI tests for co-located and distribution scenarios?

Run end-to-end CLI tests by executing Vitest to discover patterns under packages/cli/src/**/*.e2e.test.ts and packages/cli-spike-e2e/, validating terminal interactions and subprocess behavior. Built artifacts must be available before running distribution tests.

What is the difference between co-located and distribution E2E tests for a CLI?

Co-located E2E tests execute command handlers during development using bun run, while distribution E2E tests validate the final bundled artifacts under packages/cli-spike-e2e/ to ensure the built CLI behaves as expected.

Do I need Bun and Vitest to execute CLI end-to-end tests?

Yes, executing CLI end-to-end tests requires a Node-based test environment with Vitest for execution, and Bun if utilizing bun run for dev-time command handler invocation in co-located tests.

How do I spawn a CLI subprocess and manage temporary directories during E2E testing?

Use shared test utilities provided by the E2E testing framework to spawn the CLI, create temporary directories, and assert exit codes during subprocess execution for reliable terminal interaction validation.

What's the best way to validate terminal interactions and subprocess behavior in a Node CLI?

The best way to validate terminal interactions is using structured E2E tests that spawn the CLI as a subprocess, asserting exit codes and runtime behavior across both dev and build environments.

Why do my distribution E2E tests fail when running before the build step?

Distribution E2E tests fail if artifacts are not built beforehand, as the tests validate the final CLI behavior after bundling, requiring built artifacts to be available before test execution.