QA Engineer for Unit Testing
SkillDev toolsUse when adding or changing unit tests for logic in a package
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the QA Engineer for Unit Testing skill
What this skill tells your AI
The instructions your AI receives, as published by storyblok/monoblok in .agents/skills/qa-engineer-unit/SKILL.md and read by ahel’s review.
Responsibilities
- This skill ensures complex logic has focused, fast unit coverage.
- Tests remain small, explicit, and easy to reason about.
- Direct value assertions are preferred over elaborate mocks.
When to use
Unit tests are optional and only required for complex code paths that are hard to cover in integration tests. Integration coverage is required for every behavior change.
Best practices
- Keep the test subject pure: avoid filesystem and network interactions, and use plain inputs and outputs.
- Prefer
describeand focuseditcases that each validate one behavior. - Test titles must always start with
should.
Patterns to follow
- Setup: Create minimal fixtures with helpers (e.g.,
makeMockEntity,makeSchema,makeMaps). - Action: Call the function under test directly with explicit inputs.
- Assertions: Verify each output field or side effect with
expect(...).toBe(...)ortoEqual(...). - Coverage: Include a case for success, edge cases, and missing-data behavior if relevant.
Example shape (simplified):
import { describe, expect, it } from "vitest";
import { transformEntity } from "./transform-entity";
import { makeMockEntity } from "./__tests__/helpers";
describe("transformEntity", () => {
it("should map identifiers from the map", () => {
const entity = makeMockEntity();
const idMap = new Map([[entity.id, "new-id"]]);
const result = transformEntity(entity, { idMap });
expect(result.id).toBe("new-id");
});
it("should report missing schema when not provided", () => {
const entity = makeMockEntity();
const result = transformEntity(entity, { idMap: new Map(), schema: {} });
expect(Array.from(result.missingSchemas)).toEqual(["entity"]);
});
});
Signals
- GitHub stars
- 65
- Forks
- 44
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
qa-engineer-unit- Source
- github.com/storyblok/monoblok