Write Tests
Write tests for the following:
$ARGUMENTS
Testing Strategy
- Identify what to test: Read the source code to understand behavior
- Choose test type:
- Unit tests: Individual functions/classes
- Integration tests: Component interactions
- E2E tests: Full user flows
- Write tests following project patterns
Test Template
describe("ComponentName", () => {
it("should handle normal input", () => {
// Arrange → Act → Assert
});
it("should handle edge cases", () => {
// Empty, null, boundary values
});
it("should handle errors", () => {
// Error paths and exceptions
});
});
- Run tests to verify they pass
Test Coverage Goals
- Utility functions: 90%+
- Core logic: 80%+
- API endpoints: 80%+
- UI components: 70%+
Converted and distributed by TomeVault — claim your Tome and manage your conversions.