testing

Testing instructions for an Electron application using Vitest, a JavaScript and TypeScript test runner. They cover unit, integration, regression, and end-to-end tests, including browser-like tests with jsdom.

In plain words
What is it for?
Use them when adding features, writing tests, changing tested logic, or checking work before completion.
Why use it?
They help ensure new or changed code is tested, especially when dependencies fail or inputs reach boundary cases.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ces-ltd/titanx/testing
Any agent
npx skills add CES-Ltd/TitanX --skill testing
Clone the repo
git clone --depth 1 https://github.com/CES-Ltd/TitanX

Made for: Claude Code, Codex.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,043 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00055 $0.01043
Opus 5 $0.00028 $0.00522
Sonnet 5 $0.00011 $0.00209
Haiku 4.5 $0.00006 $0.00104

Measured 2d ago against content hash a40418b4bc17, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to testing — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/testing/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing Skill

Standards and workflow for writing and running tests. Every feature must be tested.

Announce at start: "I'm using testing skill to ensure proper test coverage."

Trigger Conditions

  • Writing new tests for a feature or bug fix
  • Adding a new feature (must include tests)
  • Modifying logic that has existing tests (must update them)
  • Before claiming work is complete
  • Before committing code

Framework

Vitest 4 — configured in vitest.config.ts.

Test Structure

tests/
├── unit/          # Individual functions, utilities, components
├── integration/   # IPC, database, service interactions
├── regression/    # Regression test cases
└── e2e/           # End-to-end tests (Playwright, playwright.config.ts)

Two Test Environments

Environment When File naming
node (default) Main process, utilities, services *.test.ts
jsdom DOM/browser-dependent code *.dom.test.ts

Workflow

Step 1: Identify What to Test

Before writing tests, list the riskiest scenarios first:

  • What happens when the dependency returns undefined / throws?
  • What happens at boundaries (empty list, max retries, past timestamp)?
  • What is most likely to break in production?

Step 2: Write Tests

Follow these quality rules:

1. Describe behavior, not code structure

// Wrong — describes implementation
it('should call repo.getConversation', ...)

// Correct — describes behavior
it('should return cached task without hitting repo on second call', ...)
it('should reject with error when conversation does not exist', ...)

2. Every describe block must cover at least one failure path

Happy-path-only tests leave the most dangerous code untested.

3. One behavior per test

Keep each it() focused. More than 3 expect() calls in one test is a signal it is testing too much at once.

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 139 lines · 55 tokens per session scan A a40418b4bc17

Subscribe to this mod's changes

testing is a skill published in the GitHub repository CES-Ltd/TitanX (47 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 55 tokens to every session and 1,043 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to testing, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

test-automation

Execute Vitest and Playwright test suites with result collection and failure analysis.

a5c-ai/babysitter · 0 tokens

scafld-native-smoke

Prove the hosted scafld binary through the native v2 lifecycle.

runxhq/runx · 22 tokens

test-authoring

Create or improve unit tests and Playwright E2E tests for newly implemented features, and close coverage gaps based on project requirements. Use when the user asks to write/add/complete unit tests, add E2E tests, increase test coverage, or improve existing tests.

c9r-io/orchestrator · 58 tokens

qa

QA testing skill with real browser automation. Use when asked to "test this site", "QA this page", "check for visual bugs", "verify the deploy", or when Hydra needs browser validation for UI changes. Requires the browse binary.

blueberrycongee/termcanvas · 50 tokens

test-audit

Static test-suite quality audit - coverage from lcov/Istanbul/Cobertura/go/tarpaulin reports, pyramid shape (unit/integration/e2e ratio), anti-patterns (.only leaks, skipped tests, no-assertion tests, hardcoded sleeps). Stack-aware across 11 supported stacks.

marcoguillermaz/Tierward · 64 tokens

testing-tiers

Choose the right test tier for a change and keep the suite meaningful — unit, integration, real-entry-path, end-to-end, and snapshot tiers; test the real entry path rather than a hand-built harness; verify the world rather than the component's self-report; prefer the real implementation over a mock; and treat line…

arch3rPro/dsh-skills · 106 tokens