# Nean Unit Test

> Run NEAN unit tests, report results, and optionally fix failures.

- **Type:** Skill
- **Install:** `agentstack add skill-edfenton-claude-skills-nean-unit-test`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [edfenton](https://agentstack.voostack.com/s/edfenton)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [edfenton](https://github.com/edfenton)
- **Source:** https://github.com/edfenton/claude-skills/tree/main/nean/nean-unit-test

## Install

```sh
agentstack add skill-edfenton-claude-skills-nean-unit-test
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Purpose

Run unit tests, report failures with enough detail to debug, then (with approval) fix issues and re-run to confirm.

## Arguments

- `--scope ` — Limit to `api`, `web`, `libs`, or `all` (default: all)
- `--no-fix` — Report only, don't offer to fix

## Workflow

### 1. Run tests

```bash
# All tests
npm run test

# With coverage
npm run test -- --coverage

# Scoped (using Nx)
npx nx test api
npx nx test web
npx nx run-many --target=test --projects=shared-*

# Affected only (CI optimization)
npx nx affected --target=test
```

### 2. Report results

Include:

- Pass/fail/skip counts
- Coverage summary (if available)
- Each failing test: file, test name, assertion diff or error
- If coverage not configured, note this and offer to set it up

### 3–4. Approval gate, fix and confirm

See `/shared-review-workflow` for approval gate protocol, fix constraints, and severity definitions.

## Test file conventions

```
# NestJS
apps/api/src/modules//__tests__/.service.spec.ts
apps/api/src/modules//__tests__/.controller.spec.ts

# Angular
apps/web/src/app//.component.spec.ts

# Libraries
libs///src/**/*.spec.ts
```

## Coverage thresholds

Default targets (configure in jest.config.ts):
- Libs: 80% statements, 80% branches
- Apps: 60% statements, 50% branches

## Reference

For coverage setup and common fix patterns, see `reference/nean-unit-test-reference.md`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [edfenton](https://github.com/edfenton)
- **Source:** [edfenton/claude-skills](https://github.com/edfenton/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-edfenton-claude-skills-nean-unit-test
- Seller: https://agentstack.voostack.com/s/edfenton
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
