Skip to content
Back to skills

Test

ASecurity

Run the relevant tests for what changed — detects whether to run C# unit tests, specific test projects, integration tests, or JS/TS tests based on changed files. Use when the user asks to run tests, verify changes, or check if something is broken.

  • 26 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
testingtypescriptc#bashgitapidocumentation

Works with

  • api

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add elastic/docs-builder --skill test --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Test
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/elastic-test/badge)](https://www.skillsdirectory.com/skills/elastic-test)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: test
description: Run the relevant tests for what changed — detects whether to run C# unit tests, specific test projects, integration tests, or JS/TS tests based on changed files. Use when the user asks to run tests, verify changes, or check if something is broken.
---

# Test Skill

Runs the right tests for what changed — fast feedback without running everything.

## Steps

### 1. Detect changed files

```bash
git diff --name-only HEAD
```

Or, if checking staged changes:
```bash
git diff --name-only --staged
```

### 2. Pick the right test command

Use this decision table based on which directories have changed files:

| Changed path | Test command |
|---|---|
| `src/Elastic.Documentation.Site/` | `mise run site:test`; shared views or layout CSS also `npm run visual:seed` once, then `npm run visual:check` (from `src/Elastic.Documentation.Site`) |
| `src/Elastic.Markdown/` | `dotnet test tests/Elastic.Markdown.Tests/` |
| `src/Elastic.Documentation.Configuration/` | `dotnet test tests/Elastic.Documentation.Configuration.Tests/` |
| `src/Elastic.Documentation.Navigation/` or `Navigation.Tests/` | `dotnet test tests/Navigation.Tests/` |
| `src/Elastic.ApiExplorer/` | `dotnet test tests/Elastic.ApiExplorer.Tests/` |
| `tests/Elastic.Documentation.Journeys.Tests/`, or Site markup that changes page chrome, navigation or content components | `mise run journeys:local --area <touched area>` while iterating, then `mise run journeys:test` before pushing |
| `tests-integration/` | `mise run integrate` |
| `src/tooling/docs-builder/` | `mise run test` |
| Multiple areas or uncertain | `mise run test` |

If files span more than two source areas, prefer `mise run test` to run all unit tests at once.

### 3. Run and report

- Show the command being run
- On **pass**: summarize pass count, confirm all green
- On **fail**: show the specific failing test(s), the error message, and suggest a fix approach based on the failure

## Notes

- Integration tests (`mise run integrate`) require cloned repos and take significantly longer — only run when integration test files changed or the user explicitly asks
- When in doubt, `mise run test` is the safe default (completes in under a minute)
- TypeScript type checking (not tests) is `mise run site:check`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.