Unit Tests
Khan/wonder-blocks
Jest + React Testing Library best practices for Wonder Blocks unit tests.
Helps write unit tests for UUI components using Jest, jsdom, and @epam/uui-test-utils.
$ npx skills add epam/UUI --skill uui-unit-testing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install epam/UUI uui-unit-testing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/epam/UUI.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/unit-testing .claude/skills/uui-unit-testing && rm -rf skills-srcUse ~/.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/
Install the "uui-unit-testing" agent skill from https://github.com/epam/UUI/tree/develop/.cursor/skills/unit-testing into .claude/skills/uui-unit-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uui-unit-testing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/epam/UUI/tree/develop/.cursor/skills/unit-testingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add epam/UUI --skill uui-unit-testing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install epam/UUI uui-unit-testing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/epam/UUI.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.cursor/skills/unit-testing .agents/skills/uui-unit-testing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "uui-unit-testing" agent skill from https://github.com/epam/UUI/tree/develop/.cursor/skills/unit-testing into .agents/skills/uui-unit-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uui-unit-testing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add epam/UUI --skill uui-unit-testing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install epam/UUI uui-unit-testing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/epam/UUI.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.cursor/skills/unit-testing .cursor/skills/uui-unit-testing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "uui-unit-testing" agent skill from https://github.com/epam/UUI/tree/develop/.cursor/skills/unit-testing into .cursor/skills/uui-unit-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uui-unit-testing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/epam/UUI.git --path .cursor/skills/unit-testing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add epam/UUI --skill uui-unit-testing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install epam/UUI uui-unit-testing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/epam/UUI.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.cursor/skills/unit-testing .gemini/skills/uui-unit-testing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "uui-unit-testing" agent skill from https://github.com/epam/UUI/tree/develop/.cursor/skills/unit-testing into .gemini/skills/uui-unit-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uui-unit-testing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install epam/UUI uui-unit-testingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add epam/UUI --skill uui-unit-testing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/epam/UUI.git skills-src && mkdir -p .github/skills && cp -r skills-src/.cursor/skills/unit-testing .github/skills/uui-unit-testing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "uui-unit-testing" agent skill from https://github.com/epam/UUI/tree/develop/.cursor/skills/unit-testing into .github/skills/uui-unit-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uui-unit-testing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add epam/UUI --skill uui-unit-testing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install epam/UUI uui-unit-testing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/epam/UUI.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.cursor/skills/unit-testing .opencode/skills/uui-unit-testing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "uui-unit-testing" agent skill from https://github.com/epam/UUI/tree/develop/.cursor/skills/unit-testing into .opencode/skills/uui-unit-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uui-unit-testing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
uui-unit-testingHelps write unit tests for UUI components using Jest, jsdom, and @epam/uui-test-utils.
Uui Unit Testing is an agent skill from epam/UUI. Helps write unit tests for UUI components using Jest, jsdom, and @epam/uui-test-utils. Use when writing unit tests for UUI components, updating snapshots, running Jest tests, or working with test utilities.
Its SKILL.md is about 2.4k 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. It works with Jest, React and Testing Library. The repository describes itself as: React-based components and accelerators library built by EPAM Systems. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit fd11393. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
yarnFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
uui.epam.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Uui Unit Testing loads about 2.4k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 494 words of instructions outside code blocks.
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.
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.
The full file from epam/UUI at commit fd11393, republished under its MIT licence (© epam). 494 words, ~2,419 tokens.
.claude/skills/uui-unit-testing/SKILL.md (or your agent's skills folder).UUI uses Jest with jsdom for unit testing React components. Tests are located in __tests__ folders within each package.
Test files follow the pattern: **/__tests__/**/*.test.{js,ts,tsx}
Examples:
uui/components/buttons/__tests__/Button.test.tsxuui/components/inputs/__tests__/NumericInput.test.tsxuui-core/src/hooks/__tests__/useVirtualList.test.tsxRun all tests:
yarn testRun tests in watch mode:
yarn test-watchRun a single test file:
yarn test -- --testPathPattern="Button"Use --testPathPattern to match file path, or --testNamePattern="should render" to match test names.
Update snapshots:
yarn test-updateGenerate test coverage report:
yarn test-reportCoverage report saves to .reports/unit-tests folder.
TypeScript type checking:
yarn test-typecheckWindows workaround: If encountering test errors on Windows, use reduced worker count:
yarn test --maxWorkers=2 --testTimeout=10000You can increase maxWorkers up to 4 if needed.
The @epam/uui-test-utils package provides helpers for testing UUI components with proper context.
| Export | Purpose |
|---|---|
renderSnapshotWithContextAsync | Render with UUI context, returns DocumentFragment for snapshots |
renderWithContextAsync | Render with UUI context for interaction testing |
renderHookWithContextAsync | Test custom hooks with UUI context |
setupComponentForTest | Setup component with mocks and setProps helper |
screen | Re-exported from @testing-library/react |
userEvent | Re-exported from @testing-library/user-event |
fireEvent | Re-exported from @testing-library/react |
SvgMock | Mock for SVG icon imports in snapshots |
mockReactPortalsForSnapshots | Mock portals for snapshot tests |
delay, delayAct | Async timing utilities for tests |
Renders component with UUI context and returns a DocumentFragment (via asFragment()) for snapshot matching:
import { renderSnapshotWithContextAsync } from '@epam/uui-test-utils';
import { NumericInput } from '../NumericInput';
it('should be rendered with minimum props', async () => {
const tree = await renderSnapshotWithContextAsync(
<NumericInput value={null} onValueChange={jest.fn} min={0} max={50} />
);
expect(tree).toMatchSnapshot();
});Use for testing controlled components (e.g. value + onValueChange). Provides setProps to update props without unmounting, and mocks for callback assertions. Call context.current.setProperty(name, value) in callback mocks to simulate controlled updates:
import { setupComponentForTest, screen, fireEvent } from '@epam/uui-test-utils';
import { TextInput } from '@epam/uui';
interface TestComponentProps {
value?: string;
onValueChange?: (value: string) => void;
}
const { mocks, setProps } = await setupComponentForTest<TestComponentProps>(
(context) => ({
value: 'initial',
onValueChange: jest.fn().mockImplementation((newValue) => {
context.current.setProperty('value', newValue);
}),
}),
(props) => <TextInput value={props.value} onValueChange={props.onValueChange} />,
);
const input = screen.queryByRole('textbox');
fireEvent.change(input, { target: { value: 'updated' } });
expect(mocks.onValueChange).toHaveBeenLastCalledWith('updated');
setProps({ value: 'external' }); // Update props without unmountingRenders a hook with UUI context. Returns { result, rerender, unmount, svc }:
result.current)renderHook from Testing Libraryimport { renderHookWithContextAsync, act } from '@epam/uui-test-utils';
it('should use DataSource view', async () => {
const dataSource = useArrayDataSource({ items: [...], getId: (i) => i.id }, []);
const { result, svc } = await renderHookWithContextAsync(() =>
dataSource.useView({}, () => {}, {})
);
const rows = result.current.getVisibleRows();
expect(rows).toHaveLength(5);
// svc.api, svc.uuiModals, etc. available for mocks
});
it('should test custom hook with services', async () => {
const { result, svc } = await renderHookWithContextAsync(useMyHook);
act(() => result.current.doSomething());
expect(svc.uuiAnalytics.sendEvent).toHaveBeenCalled();
});Renders component with UUI context for interaction testing:
import { renderWithContextAsync, screen, userEvent } from '@epam/uui-test-utils';
import { Tag } from '../Tag';
it('should call onClear callback', async () => {
const onClearMock = jest.fn();
await renderWithContextAsync(
<Tag caption="Test badge" onClear={onClearMock} />
);
const clearButton = await screen.findByRole('button', { name: /remove tag/i });
await userEvent.click(clearButton);
expect(onClearMock).toHaveBeenCalled();
});import React from 'react';
import { ComponentName } from '../ComponentName';
import { renderSnapshotWithContextAsync } from '@epam/uui-test-utils';
describe('ComponentName', () => {
describe('snapshots', () => {
it('should be rendered with minimum props', async () => {
const tree = await renderSnapshotWithContextAsync(<ComponentName />);
expect(tree).toMatchSnapshot();
});
it('should be rendered with maximum props', async () => {
const tree = await renderSnapshotWithContextAsync(
<ComponentName prop1="value1" prop2="value2" />
);
expect(tree).toMatchSnapshot();
});
});
});import { renderWithContextAsync, screen, userEvent } from '@epam/uui-test-utils';
it('should handle user interaction', async () => {
const onActionMock = jest.fn();
await renderWithContextAsync(
<ComponentName onAction={onActionMock} />
);
const button = await screen.findByRole('button');
await userEvent.click(button);
expect(onActionMock).toHaveBeenCalled();
});When UI changes require snapshot updates:
Run tests to see which snapshots fail:
yarn testReview changes - verify the visual changes are intentional
Update snapshots:
yarn test-updateCommit updated snapshots along with component changes
Important: Always review snapshot diffs before updating. Snapshots should reflect intentional UI changes, not accidental regressions.
@epam/uui-test-utils for component testing helpersTest coverage is collected from:
uui-coreuui-componentsuuiepam-promoepam-electricloveshipRun yarn test-report to generate coverage reports.
Use the built-in helper instead of manual mocking:
import { mockReactPortalsForSnapshots, renderSnapshotWithContextAsync } from '@epam/uui-test-utils';
describe('ComponentWithPortal', () => {
mockReactPortalsForSnapshots();
it('should render correctly', async () => {
const tree = await renderSnapshotWithContextAsync(<MyModal />);
expect(tree).toMatchSnapshot();
});
});Use SvgMock from test utils for icon props in snapshots:
import { SvgMock, renderSnapshotWithContextAsync } from '@epam/uui-test-utils';
it('should render with icon', async () => {
const tree = await renderSnapshotWithContextAsync(
<Component icon={ SvgMock } />
);
expect(tree).toMatchSnapshot();
});For specific icon imports (when behavior depends on the icon):
// @ts-expect-error
import { ReactComponent as CalendarIcon } from '@epam-assets/icons/action-calendar-fill.svg';yarn test@epam/uui-test-utils packageuui/components/inputs/__tests__/NumericInput.test.tsxuui/components/widgets/__tests__/Tag.test.tsxapp/src/docs/_examples/testing/__tests__/testComponent.test.tsxuui-core/src/data/forms/__tests__/useForm.test.tsx© epam, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .cursor/skills/unit-testing of epam/UUI.
Open the folder on GitHubat commit fd11393
Uui Unit Testing 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Uui Unit Testing this skillepam/UUI | 248 | — | ~2.4k | Automated safety check: Pass | MIT | |
| Unit TestsKhan/wonder-blocks | 163 | — | ~4.2k | Automated safety check: Pass | MIT | |
| React Testinggetsentry/sentry | 45k | — | ~2.2k | Automated safety check: Pass | Custom licence | |
| React Testingaffaan-m/ECC | 274k | 1 repos | ~3.3k | Automated safety check: Pass | MIT | |
| Senior QAalirezarezvani/claude-skills | 28k | 1 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Senior QAborghei/Claude-Skills | 874 | — | ~1.6k | Automated safety check: Pass | MIT |
Khan/wonder-blocks
Jest + React Testing Library best practices for Wonder Blocks unit tests.
getsentry/sentry
Write and review React/TypeScript tests for Sentry's frontend using Jest and React Testing Library.
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…
alirezarezvani/claude-skills
Generates unit tests, integration tests, and E2E tests for React/Next.js applications.
borghei/Claude-Skills
Testing for React/Next.js with Jest, React Testing Library, and Playwright.
ericrisco/rsc-harness
A skill your agent uses when writing or fixing frontend unit, component or custom-hook tests with Vitest or Jest plus Testing Library — rendering a component in jsdom, testing a hook in isolation…
epam/UUI
Helps create and modify UUI (EPAM Unified UI) components following established patterns.
epam/UUI
Helps work with UUI DataSources (ArrayDataSource, LazyDataSource, AsyncDataSource) powering PickerInput, DataTable, FiltersPanel, and other data-driven components.
epam/UUI
Helps update UUI documentation, add doc examples, configure Property Explorer, and manage component API documentation.
epam/UUI
Helps create and maintain E2E and screenshot tests for UUI components using Playwright.
epam/UUI
Fetches GitHub issues from URLs and creates implementation plans for UUI.
epam/UUI
Guides the UUI pull request process including branch naming, pre-PR checklist, changelog updates, and quality requirements.
Works with
Categories
Helps write unit tests for UUI components using Jest, jsdom, and @epam/uui-test-utils. Uui Unit Testing is an agent skill from epam/UUI. Helps write unit tests for UUI components using Jest, jsdom, and @epam/uui-test-utils.
Uui Unit Testing fits situations like: writing unit tests for UUI components; updating snapshots; running Jest tests; working with test utilities.
Run `npx skills add epam/UUI --skill uui-unit-testing -a claude-code`. Or copy the skill folder (.cursor/skills/unit-testing in epam/UUI) into .claude/skills/uui-unit-testing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add epam/UUI --skill uui-unit-testing -a codex`. Or copy the skill folder (.cursor/skills/unit-testing in epam/UUI) into .agents/skills/uui-unit-testing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add epam/UUI --skill uui-unit-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/uui-unit-testing, .gemini/skills/uui-unit-testing, .github/skills/uui-unit-testing and .opencode/skills/uui-unit-testing in your project.
Going by SKILL.md and its folder, Uui Unit Testing needs the command-line tools its instructions call (yarn).
SKILL.md names 1 domain. As links in the text: uui.epam.com. This is read from the text; nothing was executed.
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.
Uui Unit Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Uui Unit Testing: Unit Tests (Khan/wonder-blocks, 163 stars), React Testing (getsentry/sentry, 45k stars), React Testing (affaan-m/ECC, 274k stars) and Senior QA (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
epam (a GitHub organization) maintains it in epam/UUI, which has 248 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on September 29, 2026.
Source: epam/UUI on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.