unit-tests
Installation
SKILL.md
Unit Testing
Structure (Arrange-Act-Assert)
describe('ServiceName', () => {
it('should [expected behavior] when [condition]', () => {
// Arrange: setup
// Act: call function
// Assert: verify result
});
});
What to Test
- Happy path (normal operation)
- Edge cases (empty, null, boundary values)
- Error cases (invalid input, network failure)
- Business logic (calculations, transformations)