local-testing

Provision a mock Claude dev environment and run Vitest and BATS tests.

1.1k|68|Updated Nov 14, 2025
One-click install
npx skills add https://github.com/vm0-ai/vm0 --skill local-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: local-testing
Source: https://github.com/vm0-ai/vm0/tree/main/.claude/skills/local-testing
Command: npx skills add https://github.com/vm0-ai/vm0 --skill local-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates local testing workflows for VM0 by provisioning a dev environment with a mock Claude.

Core Features & Use Cases

  • Local testing environment setup: Start a dev server with mock Claude to verify workflows end-to-end.
  • Unit and E2E testing: Run unit tests and end-to-end CLI tests for the VM0 tooling.
  • Use Case: Imagine you want to verify a new skill interactively against a mock Claude before deploying to a real environment.

Quick Start

Start the local testing environment by spinning up the dev server and running the unit and E2E tests.

  • Start the dev server with mock Claude: cd turbo && pnpm dev
  • Run unit tests: cd turbo && pnpm vitest run
  • Run CLI E2E tests: VM0_API_URL=http://localhost:3000 USE_MOCK_CLAUDE=true BATS_TEST_TIMEOUT=60 ./e2e/test/libs/bats/bin/bats -T ./e2e/tests/01-serial/*.bats

Frequently Asked Questions about local-testing

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

FAQPage Schema
How do I run local testing with a mock Claude for VM0 workflows?

Local testing with a mock Claude requires starting the dev server via pnpm dev and executing Vitest for unit tests and BATS for CLI E2E tests with the USE_MOCK_CLAUDE variable set to true to verify workflows end-to-end.

What environment variables are needed to start the dev server for unit and E2E testing?

Starting the dev server requires setting environment variables including USE_MOCK_CLAUDE, CONCURRENT_RUN_LIMIT, SECRETS_ENCRYPTION_KEY, E2B_API_KEY, CLERK_SECRET_KEY, and NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY to properly provision the testing environment.

Do I need cargo and pnpm installed to run Vitest and BATS tests?

Yes, running Vitest and BATS tests requires pnpm and cargo installed locally because the testing workflow operates within a turbo workspace layout that relies on these package managers to provision dependencies and execute the test suites.

How do I execute CLI end-to-end tests using BATS against a mocked Claude environment?

To execute CLI end-to-end tests using BATS, run the bats binary targeting the e2e/tests directory while passing VM0_API_URL, USE_MOCK_CLAUDE=true, and BATS_TEST_TIMEOUT=60 to test against the local dev server with mocked Claude.

Can I verify a new skill interactively against a mock Claude before deploying?

Yes, you can verify a new skill interactively by provisioning a local dev environment with a mock Claude, allowing you to validate unit and end-to-end CLI testing workflows locally before deploying to a real environment.

What's the best way to run unit tests within a turbo workspace for VM0?

The best way to run unit tests within a turbo workspace for VM0 is navigating to the turbo directory and executing pnpm vitest run, which triggers the test suite against the provisioned local development environment.