Unit test
Modular, scalable, automated development intelligence.
npx -y skills add DongDuong2001/pudo-code-system --skill unit-testAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Unit testing techniques, mocking, and assertions
SKILL.md
0.8 KB, as published. Nobody here has run it
Unit Test Skill
This skill focuses on writing fast, isolated tests for individual units of code (functions, methods, classes).
When to use this skill
- When writing tests for utility functions, algorithms, or standalone classes.
- When using tools like Jest, pytest, JUnit, or xUnit.
- When needing to mock out dependencies (databases, APIs, file systems).
Guidelines
- Isolation: A unit test should not rely on an external database or network. Use mocks or stubs instead.
- Naming: Use clear, descriptive names (e.g.,
calculateTotal_withValidInput_returnsCorrectSum). - Structure: Use the Arrange-Act-Assert (AAA) pattern.
- Speed: Unit tests must be fast so developers can run them frequently.