Skip to content
Back to skills

Testing Unit

ASecurity

Unit-тесты (Vitest/Jest) для файла/модуля — happy path + границы + ошибки, с реальным прогоном и выводом (роль testing). Use when нужно покрыть функцию/модуль модульными тестами.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
testingnodetesting

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add Vitammiin/agent-vorcl-flow --skill testing-unit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Testing Unit?

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

Security grade badge for Testing Unit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vitammiin-testing-unit/badge)](https://www.skillsdirectory.com/skills/vitammiin-testing-unit)

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: testing-unit
description: Unit-тесты (Vitest/Jest) для файла/модуля — happy path + границы + ошибки, с реальным прогоном и выводом (роль testing). Use when нужно покрыть функцию/модуль модульными тестами.
---

# Задача: unit-тесты для файла/модуля

Напиши unit-тесты (см. `$testing-strategy`).

1. Раннер и конвенции — по `package.json` (`vitest`/`jest`/node:test, `*.test.ts` рядом vs `__tests__/`); не навязывай Vitest Jest-проекту.
2. Прочитай код, выпиши контракты: входы/выходы, границы, ожидаемые ошибки.
3. Покрой happy path, граничные значения (пусто/0/max/unicode) и ошибки (невалидный вход, отказ зависимости).
4. Мокай только границы I/O (сеть/БД/файлы/время/random); домен не мокай. Структура AAA, имя — «что делает при каком условии».
5. Покажи, что тест умеет падать (прогон со сломанным ожиданием / до фикса).
6. Прогони (`npx vitest run <файл>` / `npx jest <файл>`) и вставь вывод; красный → чини до зелёного. Пустой ввод — спроси файл/модуль.

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.

Comments

Loading comments…

Newsletter

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