test-script

Write deterministic git-spice test scripts with txtar data blocks and golden-file comparisons.

744|71|Updated Jun 30, 2023
One-click install
npx skills add https://github.com/abhinav/git-spice --skill test-script
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-script
Source: https://github.com/abhinav/git-spice/tree/main/.claude/skills/test-script
Command: npx skills add https://github.com/abhinav/git-spice --skill test-script

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps teams create and maintain deterministic test scripts for git-spice workflows, enabling repeatable end-to-end validations of branch stacking, ShamHub forge simulations, and golden-file comparisons.

Core Features & Use Cases

  • Structured guidance for writing plain-text test scripts in testdata/script/, supporting txtar-style files and deterministic test data.
  • Fosters reproducible validation of stack operations, interactive prompts, and forge interactions with ShamHub simulations.
  • Clear conventions for naming, in-script data blocks, and integration with the test harness (mise) to run and update golden outputs.

Quick Start

Create a new test script under testdata/script named for the scenario and run it with mise run test:script --run <name>.

Frequently Asked Questions about test-script

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

FAQPage Schema
How do I write deterministic test scripts for git-spice branch stacking workflows?

Deterministic test scripts for git-spice workflows use txtar-style files with structured data blocks to specify fixed time and author values, enabling repeatable end-to-end validation of branch stacking operations. You place these plain-text scripts under testdata/script/ to ensure reproducible outputs.

What is the best way to simulate forge interactions when testing git-spice?

Simulating forge interactions when testing git-spice is achieved through ShamHub forge simulations, which allow you to validate interactive prompts and stack operations against a simulated remote repository deterministically within your test scripts.

How do I run and update golden-file comparisons for txtar test data?

Golden-file comparisons for txtar test data are run and updated using the test harness via the command mise run test:script --run <name>, which executes the scenario and validates deterministic outputs against the expected golden files.

Does this testing approach work for validating interactive prompts in git-spice?

Yes, this testing approach validates interactive prompts in git-spice by embedding prompt interactions within structured txtar-style test scripts, ensuring reproducible validation of stack operations and forge interactions without manual input.

Why do my git-spice end-to-end tests fail with non-deterministic outputs?

Git-spice end-to-end tests fail with non-deterministic outputs when scripts omit explicit time and author specifications. Applying deterministic test data blocks via txtar formats enforces fixed commit metadata, resolving golden-file comparison mismatches.

Can I use txtar test scripts for end-to-end validation of stack operations?

Yes, you can use txtar test scripts for end-to-end validation of stack operations by defining plain-text test data blocks under testdata/script/ and executing them with the mise test harness to compare deterministic outputs.