When generating tests for ($ARGUMENTS):
- Analyze the code to understand all code paths
- Identify test scenarios:
- Happy path (normal expected usage)
- Edge cases (empty input, null, undefined, boundary values)
- Error cases (invalid input, exceptions)
- Async behavior if applicable
- Write tests using the project's test framework (Jest, Vitest, Mocha, etc.)
- Structure tests with clear describe/it blocks
- Include:
- Descriptive test names that explain expected behavior
- Arrange-Act-Assert pattern
- Mock external dependencies
- Test both input and output
- Run tests to verify they pass