testing

Testing guidance for Radix NG interface components across unit tests, accessibility checks, browser tests, server rendering, and performance tests. Unit tests check small pieces of code, while browser tests check behavior in a real page.

In plain words
What is it for?
Use it to test component logic, keyboard behavior, ARIA accessibility, layout, floating overlays, server rendering, and performance.
Why use it?
It helps choose a test type that can actually detect the change, especially for layout, overlays, positioning, and visibility that simulated pages cannot reproduce.

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/radix-ng/primitives/testing
Any agent
npx skills add radix-ng/primitives --skill testing
Clone the repo
git clone --depth 1 https://github.com/radix-ng/primitives

Made for: Claude Code, Codex.

Per session 184 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,098 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00184 $0.03098
Opus 5 $0.00092 $0.01549
Sonnet 5 $0.00037 $0.00620
Haiku 4.5 $0.00018 $0.00310

Measured 2d ago against content hash 6af8796d8de2, 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.

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

How it starts

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

Testing Radix NG Primitives

First pick the layer, then write the test. Most bugs in this library are caught by Vitest unit tests — but the suite runs in jsdom, which has no real layout (no box sizes, offsetHeight / scroll metrics, flexbox resolution, getComputedStyle geometry, or floating-ui positioning), and never opens an overlay the way a user does. Those gaps have their own layers. Match the change to the layer below before writing anything.

Decision matrix — what changed → which layer

The change you made / bug you fixed Add / run the test here
Directive logic, state, signals, inputs/outputs, keyboard handlers, value/selection model Unitpackages/primitives/<name>/__tests__/*.spec.ts
ARIA roles / aria-* / label associations Unit + jest-axe in the same spec
Layout / flex / overflow / scroll, part visibility ([hidden]), sizing, z-index Browserapps/visual-regression/tests/<name>.behavior.spec.ts (jsdom is blind)
Overlay positioning (side/align/collision), *rdxXxxPortal teleport target, anatomy nesting Browserbehavior.spec.ts (+ overlays.visual.spec.ts for the open-state look)
A bug that throws only on open/interactionNG0201 (missing provider), NG0951 (required query) Browserbehavior.spec.ts with pageerror/console listeners
Pixel-level visual / styling regression Browser*.visual.spec.ts screenshot baseline
SSR render, hydration (ngh), SSR-stable ids, platform guards SSRapps/radix-ssr-testing/src/ssr-rendering.spec.ts (+ keep the page current)
Render/update performance of a primitive Perfapps/radix-perf-testing/src/tests/<name>.bench.ts

Read the full file on GitHub · 200 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 · 200 lines · 184 tokens per session scan A 6af8796d8de2

Subscribe to this mod's changes

testing is a skill published in the GitHub repository radix-ng/primitives (269 stars, last pushed 8d ago), licensed MIT. It adds 184 tokens to every session and 3,098 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.