Agent skill

Unit Tests

by Khan in Khan/wonder-blocks

Jest + React Testing Library best practices for Wonder Blocks unit tests.

MITAuto-check passedTesting & QA

Install Unit Tests

skills CLI
$ npx skills add Khan/wonder-blocks --skill unit-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Khan/wonder-blocks unit-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Khan/wonder-blocks.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/unit-tests .claude/skills/unit-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unit-tests
GitHub stars
163
Token cost
~4.2k tokens
SKILL.md length
1,290 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Jest + React Testing Library best practices for Wonder Blocks unit tests.

  • Works in 4 steps: NEVER mock console.error - This hides… → ALWAYS use jest.spyOn() to create spies… → Store spy return values in variables… → …
  • Editing .test.ts / .test.tsx files
  • SKILL.md covers Core Testing Principles, Mocking and Spying, Wonder Blocks Component Testing and Tools and Commands, plus 1 more section
  • Calls pnpm

What it does

Unit Tests is an agent skill from Khan/wonder-blocks. Jest + React Testing Library best practices for Wonder Blocks unit tests. Use when creating or editing .test.ts / .test.tsx files.

Its SKILL.md is about 4.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Unit testing and React components. It works with Jest, Testing Library and React. The repository describes itself as: React components for Wonder Blocks design system. The licence is MIT.

When your agent uses it

  • Editing .test.ts / .test.tsx files
  • Tasks that involve Unit testing
  • Tasks that involve React components

Example prompts

  • “/unit-tests”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. NEVER mock console.error - This hides real implementation issues and errors
  2. ALWAYS use jest.spyOn() to create spies - Never treat the original function as though it were a spy
  3. Store spy return values in variables ONLY when asserting on them - Avoids unused variable linter errors
  4. NEVER mock outside of tests - Even if it means code duplication, keep mocks inside test cases

What it can do on your machine

Read from SKILL.md and the folder at commit 1ba546c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Unit Tests loads about 4.2k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 1,290 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~4.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Khan/wonder-blocks at commit 1ba546c, republished under its MIT licence (© Khan). 1,290 words, ~4,180 tokens.

Download SKILL.mdSave it as .claude/skills/unit-tests/SKILL.md (or your agent's skills folder).
name
unit-tests
description
Jest + React Testing Library best practices for Wonder Blocks unit tests. Use when creating or editing `.test.ts` / `.test.tsx` files.

Jest Testing Best Practices

This guide covers testing patterns and best practices for Jest and React Testing Library in the Wonder Blocks codebase.

Core Testing Principles

⚠️ Critical Setup Rules

Test Workflow Priority:

  • ✅ ALWAYS fix failing tests BEFORE fixing linting errors
  • ✅ Focus on underlying errors, not Unhandled console.error call messages
  • ⚠️ When tests fail with Unhandled console.error call, look for the root cause error (e.g., ReferenceError: window is not defined)
  • ⚠️ The console.error messages are symptoms, not the actual problem - fix the underlying issue

File Structure:

  • ✅ Name test files with .test.ts or .test.tsx suffix
  • ✅ Place in __tests__/ directory OR colocate with source files (follow local conventions)

Test Framework Setup:

  • ✅ Additional matchers from React Testing Library (RTL) and jest-extended are available
  • ✅ Use describe/it pattern for test organization
  • ✅ Use globalThis prefix when accessing global objects
  • ✅ Prioritize testing non-trivial business logic over trivial implementations
Arrange-Act-Assert Pattern

⚠️ ALWAYS use this three-section structure:

typescript
describe("Calculator", () => {
    it("should add two numbers correctly", () => {
        // Arrange
        const a = 5;
        const b = 3;

        // Act
        const result = add(a, b);

        // Assert
        expect(result).toBe(8);
    });
});

Rules:

  • ✅ ALWAYS divide tests into Arrange, Act, Assert sections with comments
  • ✅ Each section gets exactly one comment label (// Arrange, // Act, // Assert) — no additional comments within a section
  • ❌ NEVER combine sections (e.g., don't write // Act & Assert)
  • ❌ NEVER use multiple Act or Assert sections in a single test (split into separate tests instead)
  • ❌ NEVER remove Arrange, Act, Assert comments

Exception - Testing Thrown Errors:

When testing errors, use an underTest variable in the Act section:

typescript
it("should throw an error when input is invalid", () => {
    // Arrange
    const invalidInput = "invalid";

    // Act
    const underTest = () => {
        processInput(invalidInput);
    };

    // Assert
    expect(underTest).toThrow("Invalid input");
});
Be Concise and Avoid Over-Testing

⚠️ Focus on what matters - don't overdo it:

DO Test:

  • ✅ Non-trivial business logic - Complex calculations, data transformations, validation rules
  • ✅ User interactions - Click handlers, form submissions, keyboard navigation
  • ✅ Accessibility - ARIA attributes, keyboard support, focus management
  • ✅ Edge cases and error conditions - Null values, empty states, error handling
  • ✅ Integration points - API calls, event callbacks, state changes
  • ✅ Bug fixes - Add a test that reproduces the bug to prevent regressions

DON'T Test:

  • ❌ Trivial implementations - Simple getters/setters, pass-through functions
  • ❌ Style-only props - Visual appearance is covered by visual regression tests in Storybook
  • ❌ Third-party libraries - Assume they work; test your usage of them
  • ❌ Implementation details - Internal state that doesn't affect output/behavior
  • ❌ Additional logic in tests - Use existing utility functions instead of reimplementing logic in tests
typescript
// ❌ DON'T: Testing style-only props (use visual regression tests instead)
it("should apply primary color when kind is primary", () => {
    render(<Button kind="primary" />);
    expect(screen.getByRole("button")).toHaveStyle({ backgroundColor: "blue" });
});

// ✅ DO: Test meaningful behavior
it("should call onClick when clicked", async () => {
    // Arrange
    const handleClick = jest.fn();
    render(<Button onClick={handleClick}>Click me</Button>);

    // Act
    await userEvent.click(screen.getByRole("button"));

    // Assert
    expect(handleClick).toHaveBeenCalledTimes(1);
});

// ✅ DO: Test non-trivial logic
it("should validate email format and return error message", () => {
    // Arrange
    const invalidEmail = "not-an-email";

    // Act
    const result = validateEmail(invalidEmail);

    // Assert
    expect(result).toBe("Please enter a valid email address");
});

Key Principles:

  • ✅ Test behavior, not implementation - Focus on what the component does, not how
  • ✅ Prioritize critical paths - Test the most important user flows first
  • ✅ Keep tests simple and readable - Each test should have a clear, single purpose
  • ✅ Don't add logic to tests - Tests should only test the component/function; use existing utility functions from the codebase instead of reimplementing logic in tests
  • ✅ Use visual regression tests for styling - Storybook snapshot tests handle visual appearance
  • ✅ Balance coverage with maintainability - More tests ≠ better tests
Assertions

Best Practices:

  • ✅ Use specific matchers when possible (e.g., toBe, toEqual, toHaveBeenCalledWith)
  • ✅ Prefer explicit assertions over implicit ones
  • ✅ Use semantic matchers from RTL: toBeInTheDocument(), toBeVisible(), toHaveAttribute()
  • ❌ Avoid Jest snapshots (.toMatchSnapshot(), .toMatchInlineSnapshot()) - use Chromatic + Storybook for visual regression tests, or use specific attribute assertions instead
One Expect Per Test

⚠️ Each test should have exactly one expect. If you need to assert multiple things, split them into separate tests. Multiple assertions hide which behavior actually broke when the test fails.

Parameterized Tests with it.each

When to use: Testing the same logic with multiple input/output combinations

✅ DO: Use it.each for data-driven tests

typescript
describe("Calculator", () => {
    it.each([
        [2, 3, 5],
        [0, 0, 0],
        [-1, 1, 0],
        [10, -5, 5],
    ])("should add %i and %i to equal %i", (a, b, expected) => {
        // Arrange
        // (inputs come from it.each)

        // Act
        const result = add(a, b);

        // Assert
        expect(result).toBe(expected);
    });
});

Benefits:

  • ✅ Reduces Duplication: Test same logic with different inputs
  • ✅ Clear Test Names: Each test shows specific values being tested
  • ✅ Easy to Extend: Simply add new arrays to test data
  • ✅ Better Coverage: Test edge cases and boundary conditions efficiently
  • ✅ Comprehensive Testing: Essential for testing all prop combinations and states in Wonder Blocks components

Mocking and Spying

⚠️ Critical Rules - ALWAYS Follow These
  1. NEVER mock console.error - This hides real implementation issues and errors
  2. ALWAYS use jest.spyOn() to create spies - Never treat the original function as though it were a spy
  3. Store spy return values in variables ONLY when asserting on them - Avoids unused variable linter errors
  4. NEVER mock outside of tests - Even if it means code duplication, keep mocks inside test cases
Method Spying - Correct Pattern

✅ DO: Use jest.spyOn and store the result when asserting

typescript
import * as SomeFile from "./some-file.ts";

describe("MyComponent", () => {
    it("should call someMethod with correct args", () => {
        // Arrange
        // Store spy because we'll assert on it later
        const spy = jest.spyOn(SomeFile, "someMethod").mockReturnValue(mockValue);

        // Act
        myFunction();

        // Assert
        expect(spy).toHaveBeenCalledWith(expectedArgs);
    });
});

❌ DON'T: Treat the original function as a spy without jest.spyOn()

typescript
// ❌ WRONG - This will fail because someMethod is not a spy
import * as SomeFile from "./some-file.ts";

describe("MyComponent", () => {
    it("should call someMethod", () => {
        // Act
        myFunction();

        // Assert
        expect(SomeFile.someMethod).toHaveBeenCalled(); // ❌ ERROR! Not a spy
    });
});
When to Store Spies in Variables

Spies serve two purposes:

  1. Mocking behavior - Replace function implementation or return value
  2. Verification - Assert the function was called with correct arguments

✅ Mocking only (no variable needed):

typescript
it("should process user data", () => {
    // Arrange
    // Mock the API call to return test data, but don't store it
    jest.spyOn(API, "fetchUser").mockResolvedValue(mockUserData);

    // Act
    const result = processUserProfile();

    // Assert
    // We're testing processUserProfile's logic, not that fetchUser was called
    expect(result.displayName).toBe("John Doe");
    // No spy variable = no unused variable linter error
});

✅ Mocking AND verification (store in variable):

typescript
it("should call analytics when button is clicked", () => {
    // Arrange
    // Store the spy because we'll assert on it
    const trackEventSpy = jest
        .spyOn(Analytics, "trackEvent")
        .mockReturnValue(undefined);

    // Act
    userEvent.click(screen.getByRole("button"));

    // Assert
    // We're testing that the analytics call happens correctly
    expect(trackEventSpy).toHaveBeenCalledWith("button_click", {
        buttonId: "submit",
    });
});

Key point: Only store the spy in a variable if you're going to assert on it. This avoids unused variable linter errors while still allowing you to verify calls when needed.

Common Spy Patterns

Mock only (no variable):

typescript
// When you only need to control the return value
jest.spyOn(module, "functionName").mockReturnValue(mockValue);
jest.spyOn(module, "asyncFunction").mockResolvedValue(mockValue);
jest.spyOn(module, "asyncFunction").mockRejectedValue(new Error("Test error"));

Mock and verify (store in variable):

typescript
// When you need to assert the spy was called
const spy = jest.spyOn(module, "functionName").mockReturnValue(mockValue);
// ... later in Assert section:
expect(spy).toHaveBeenCalledWith(expectedArgs);

Spy with mock implementation:

typescript
// Store only if you'll verify it was called
const spy = jest.spyOn(module, "functionName").mockImplementation((arg) => {
    return processedValue;
});
Show full SKILL.md (538 more words)Show less
Mocking Guidelines

DO:

  • ✅ Use jest.spyOn() for mocking functions and tracking calls
  • ✅ Store spy return values in variables ONLY when you need to assert on them
  • ✅ Chain .mockReturnValue() or similar directly on jest.spyOn() when only mocking behavior
  • ✅ Keep mocks and spies inside test cases when possible
  • ✅ Use mocking and spies to isolate the code under test at boundaries with other code
  • ✅ Clean up spies after tests (Jest does this automatically with clearAllMocks)

DON'T:

  • ❌ Never mock console.error - this hides real implementation issues
  • ❌ Never treat original functions as spies without jest.spyOn()
  • ❌ Never store spies in variables if you won't assert on them (causes unused variable linter errors)
  • ❌ Avoid mocking outside of tests, even if it means code duplication
Hook Testing

✅ Use renderHook:

typescript
import {renderHook} from "@testing-library/react";

// Direct for simple hooks
const {result} = renderHook(() => useMyHook(params));
User Interactions

✅ ALWAYS use userEvent for interactions:

typescript
import userEvent from "@testing-library/user-event";

// ✅ DO: Use userEvent (realistic, includes focus/blur/typing)
await userEvent.click(screen.getByRole("button"));
await userEvent.type(screen.getByRole("textbox"), "hello");

// ❌ DON'T: Use fireEvent (low-level, less realistic)
fireEvent.click(button);
Browser Behavior and jsdom Limitations

⚠️ jsdom does not fully implement all browser behaviors. Common limitations include: getBoundingClientRect(), scroll positions, offsetWidth/offsetHeight, clipboard API, CSS animations, and Intersection/Resize Observers.

✅ Mock browser APIs when testing in unit tests:

typescript
// Mock scrollIntoView
const scrollIntoViewMock = jest.fn();
Element.prototype.scrollIntoView = scrollIntoViewMock;

// Mock getBoundingClientRect
jest.spyOn(Element.prototype, "getBoundingClientRect").mockReturnValue({
    top: 100, left: 100, bottom: 200, right: 200,
    width: 100, height: 100, x: 100, y: 100, toJSON: () => {},
});

✅ Use Storybook interaction tests for behavior that's difficult to mock accurately (scroll, layout, clipboard, complex focus management). See .agents/skills/storybook/SKILL.md for details.

Element Selection

Query priority (use in this order):

  1. ✅ Semantic queries (best): getByRole, getByLabelText, getByText
  2. ✅ Test IDs (fallback): getByTestId with data-testid attribute
  3. ❌ NEVER use CSS selectors, direct DOM traversal, or raw node access

❌ NEVER access DOM nodes directly. Always use Testing Library queries. Direct node access couples tests to implementation structure, not behavior.

typescript
// ✅ DO: Testing Library queries
screen.getByRole("button", {name: /submit/i});
screen.getByLabelText("Email address");
screen.findByText("Welcome back");
screen.getByTestId("custom-widget");

// ❌ DON'T: CSS selectors
container.querySelector(".my-class");
container.querySelector("#my-id");

// ❌ DON'T: Direct node traversal
element.parentElement;
element.children[0];
element.firstChild;
element.nextSibling;

Wonder Blocks Component Testing

Test Organization

✅ Group related tests using describe blocks:

typescript
describe("MyComponent", () => {
    describe("Props", () => { /* prop tests */ });
    describe("Event Handlers", () => { /* onClick, onChange tests */ });
    describe("Accessibility", () => {
        describe("axe", () => { /* toHaveNoA11yViolations tests */ });
        describe("ARIA", () => { /* aria attribute tests */ });
        describe("Focus", () => { /* focus management tests */ });
        describe("Keyboard Interactions", () => { /* keyboard nav tests */ });
    });
});
Test Coverage

Unit tests for a component should cover:

Base Tests
  • ref is forwarded
Props
  • Cover expected behaviour when certain props are set.
  • Exclude tests for props that are related to styles only, since this should be covered by visual regression tests instead
  • Cover expected behaviour with default prop values
  • Use it.each when there are multiple combinations of things you want to test together
Event Handlers
  • Check that any event handlers are triggered by the expected conditions
  • Verify callbacks are called with correct arguments
Accessibility
  • Confirm that roles, semantics, and aria attributes are correctly set and wired together
  • Use the .toHaveNoA11yViolations jest matcher to confirm that a component doesn't have accessibility warnings
  • Confirm keyboard interactions and navigation
  • Focus management
  • Confirm accessible names
  • Check for aria-disabled="true" for determining disabled state (not the disabled attribute)

Tools and Commands

Terminal Commands
bash
# Run all tests
pnpm jest

# Run tests in watch mode
pnpm jest --watch

# Update snapshots
pnpm jest -u

# Run tests with coverage
pnpm jest --coverage

# Run specific test file
pnpm jest path/to/test-file.test.ts

# Debug with verbose output
pnpm jest --verbose --runInBand
Debugging Priority Order

Terminal Commands

  • Add console.log statements for debugging
  • Use --verbose flag for detailed output
  • Use --runInBand for sequential execution (easier to debug)
  • Use Node debugger with debugger statements

Best Practices Summary

  1. ✅ Structure: Use Arrange-Act-Assert pattern with comments
  2. ✅ Focus: Test behavior, not implementation details
  3. ✅ Queries: Use semantic queries (getByRole, getByLabelText) over test IDs
  4. ✅ Interactions: Use userEvent instead of fireEvent
  5. ✅ Spies: Use jest.spyOn() and only store in variables when asserting
  6. ✅ Accessibility: Include toHaveNoA11yViolations tests
  7. ✅ Organization: Group related tests with describe blocks
  8. ✅ Assertions: One expect per test — split into separate tests if you need more
  9. ✅ Parameterized: Use it.each for testing multiple input/output combinations
  10. ✅ Browser APIs: Mock jsdom limitations properly, or use Storybook interaction tests for browser-specific behavior
  11. ✅ Bug Fixes: Add tests that reproduce bugs to prevent regressions
  12. ❌ Avoid: Testing style-only props, mocking console.error, over-testing trivial code, adding logic to tests

© Khan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/unit-tests of Khan/wonder-blocks.

Open the folder on GitHubat commit 1ba546c

Compare with similar skills

Unit Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unit Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unit Tests this skillKhan/wonder-blocks163—~4.2kAutomated safety check: PassMIT
React Testinggetsentry/sentry45k—~2.2kAutomated safety check: PassCustom licence
React Testingaffaan-m/ECC274k1 repos~3.3kAutomated safety check: PassMIT
React TestingHoangNguyen0403/agent-skills-standard570—~1.3kAutomated safety check: PassMIT
Write Testsgrafana/synthetic-monitoring-app171—~1.2kAutomated safety check: PassAGPL-3.0
Testingredis/RedisInsight8.9k—~3.3kAutomated safety check: PassCustom licence

Similar skills

  • React Testing

    getsentry/sentry

    Official

    Write and review React/TypeScript tests for Sentry's frontend using Jest and React Testing Library.

    45k GitHub stars~2.2k tokensUpdated today
    Testing & QAAuto-check passed
  • React Testing

    affaan-m/ECC

    React component testing with React Testing Library, Vitest/Jest, MSW for network mocking, accessibility assertions with axe, and the decision boundary between component tests and Playwright/Cypress…

    274k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • React Testing

    HoangNguyen0403/agent-skills-standard

    Test React components with RTL and Jest/Vitest. An agent skill from HoangNguyen0403/agent-skills-standard.

    570 GitHub stars~1.3k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Write Tests

    grafana/synthetic-monitoring-app

    Official

    Write Jest integration and unit tests for the Grafana Synthetic Monitoring app using React Testing Library, MSW, and src/test helpers.

    171 GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Testing

    redis/RedisInsight

    Official

    Unit/integration testing standards for RedisInsight using Jest and Testing Library: test structure, the renderComponent helper, faker for test data, mocking patterns, and waitFor instead of fixed…

    8.9k GitHub stars~3.3k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Helps write unit tests for UUI components using Jest, jsdom, and @epam/uui-test-utils.

    248 GitHub stars~2.4k tokensUpdated 8 days ago
    Testing & QAAuto-check passed

More from Khan/wonder-blocks

  • Wonder Blocks

    Khan/wonder-blocks

    Implements user interfaces using the Wonder Blocks (WB) design system — Khan Academy's React component library.

    163 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Storybook

    Khan/wonder-blocks

    Storybook best practices for Wonder Blocks component stories.

    163 GitHub stars~4.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Unit Tests

What does Unit Tests do?

Jest + React Testing Library best practices for Wonder Blocks unit tests. Unit Tests is an agent skill from Khan/wonder-blocks. Jest + React Testing Library best practices for Wonder Blocks unit tests.

When should I use Unit Tests?

Unit Tests fits situations like: editing .test.ts / .test.tsx files; tasks that involve Unit testing; tasks that involve React components.

How do I install Unit Tests in Claude Code?

Run `npx skills add Khan/wonder-blocks --skill unit-tests -a claude-code`. Or copy the skill folder (.agents/skills/unit-tests in Khan/wonder-blocks) into .claude/skills/unit-tests in your project. Claude Code loads it when a task matches its description.

How do I install Unit Tests in Codex?

Run `npx skills add Khan/wonder-blocks --skill unit-tests -a codex`. Or copy the skill folder (.agents/skills/unit-tests in Khan/wonder-blocks) into .agents/skills/unit-tests in your project. Codex loads it when a task matches its description.

Can I use Unit Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Khan/wonder-blocks --skill unit-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unit-tests, .gemini/skills/unit-tests, .github/skills/unit-tests and .opencode/skills/unit-tests in your project.

What does Unit Tests need to run?

Going by SKILL.md and its folder, Unit Tests needs the command-line tools its instructions call (pnpm).

Does Unit Tests access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Unit Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Unit Tests use?

Unit Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unit Tests use?

About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Unit Tests?

Skills that share tags, products or a category with Unit Tests: React Testing (getsentry/sentry, 45k stars), React Testing (affaan-m/ECC, 274k stars), React Testing (HoangNguyen0403/agent-skills-standard, 570 stars) and Write Tests (grafana/synthetic-monitoring-app, 171 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unit Tests?

Khan (a GitHub organization) maintains it in Khan/wonder-blocks, which has 163 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 6, 2026.

Source: Khan/wonder-blocks on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.