doc-testing

Document how to write integration tests for magenta.nvim using driver-based actions and mock streams.

462|33|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/dlants/magenta.nvim --skill doc-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doc-testing
Source: https://github.com/dlants/magenta.nvim/tree/main/.magenta/skills/doc-testing
Command: npx skills add https://github.com/dlants/magenta.nvim --skill doc-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill documents how to write reliable integration tests for magenta.nvim by providing a canonical structure, setup steps, and example flows.

Core Features & Use Cases

  • Canonical test structure and driver-based interactions for consistent test results
  • Mock provider workflows with mockAnthropic streams to simulate AI interactions
  • Deterministic change-tracker assertions and realistic test scenarios like file setup and directory permissions
  • Guidance for using the test driver to perform realistic Neovim actions and validations

Quick Start

Use the doc-testing skill to set up a minimal integration test with the provided driver, perform a simple nvim action, and verify the expected tool result in the mock stream.

Frequently Asked Questions about doc-testing

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

FAQPage Schema
How do I write integration tests for Neovim plugins?

Integration tests for Neovim plugins use a driver-based API to perform realistic nvim actions and validate results through explicit type-safe assertions, ensuring deterministic and reproducible test scenarios across file setups and directory permissions.

How do I mock Anthropic API streams in Neovim integration tests?

Mock Anthropic API streams in Neovim integration tests by using mockAnthropic workflows to simulate AI interactions, validating tool results and UI changes against the mocked responses within the test driver environment.

What is a change-tracker assertion in Neovim testing?

A change-tracker assertion in Neovim testing validates file modification and UI update histories, ensuring driver-based actions produce expected deterministic outcomes during integration test execution.

Does the Magenta.nvim test driver support external directory access scenarios?

Yes, the Magenta.nvim test driver supports external directory access scenarios, providing setup steps and realistic test environments to validate interactions and permissions across home and external directory configurations.

Why are my Neovim plugin integration tests producing non-deterministic results?

Neovim plugin integration tests produce non-deterministic results when lacking explicit type-safe assertions and canonical setup, requiring mock provider interactions and driver-based actions to ensure reproducible test flows.