qa-engineer-integration

Enforce Vitest integration tests for CLI behavior changes with MSW and memfs.

60|40|Updated May 19, 2025
One-click install
npx skills add https://github.com/storyblok/monoblok --skill qa-engineer-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qa-engineer-integration
Source: https://github.com/storyblok/monoblok/tree/main/packages/cli/.claude/skills/qa-engineer-integration
Command: npx skills add https://github.com/storyblok/monoblok --skill qa-engineer-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures integration tests are written and enforced for CLI changes, preventing regressions and preserving expected command behavior across runs and environments.

Core Features & Use Cases

  • Enforces end-to-end integration tests for new features, CLI changes, or bug fixes.
  • Provides reusable preconditions, MSW-based mocks, and memfs-based filesystem state for deterministic tests.
  • Drives the CLI via command.parseAsync and asserts side effects, manifests, logs, and reports.

Quick Start

Use this skill to add integration tests for a new CLI command, validating behavior under filesystem reads/writes and API interactions.

Frequently Asked Questions about qa-engineer-integration

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

FAQPage Schema
How do I write integration tests for CLI changes using Vitest?

Integration tests for CLI changes with Vitest involve driving the command via command.parseAsync and asserting side effects, manifests, logs, and reports. This validates filesystem and API interactions to prevent regressions.

Can I mock filesystem state and API calls in CLI integration tests?

Yes, you can mock filesystem state and API calls in CLI integration tests using memfs for deterministic filesystem reads and writes, and MSW for mocking API interactions to ensure stable end-to-end verification.

What is the best way to validate CLI behavior changes end-to-end?

The best way to validate CLI behavior changes end-to-end is by enforcing integration tests that execute the CLI through command.parseAsync and apply assertive checks against side effects, logs, and generated reports.

Do I need preconditions helpers to test CLI commands with Vitest?

Yes, preconditions helpers are required to establish deterministic test environments when testing CLI commands with Vitest. They set up the necessary state before executing the CLI through command.parseAsync for accurate assertions.

When should I use MSW and memfs for CLI integration testing?

You should use MSW and memfs for CLI integration testing when you need to validate feature updates, bug fixes, or API changes requiring end-to-end verification of filesystem operations and external API interactions.