27 lines
599 B
YAML
27 lines
599 B
YAML
name: generate-tests
|
|
description: Generate unit tests for code
|
|
tags: [testing, development, code-generation]
|
|
variables:
|
|
- name: code
|
|
description: The code to generate tests for
|
|
required: true
|
|
- name: framework
|
|
description: Testing framework (pytest, unittest, jest)
|
|
required: false
|
|
default: pytest
|
|
template: |
|
|
Generate comprehensive unit tests for the following code using {{ framework }}:
|
|
|
|
```python
|
|
{{ code }}
|
|
```
|
|
|
|
Include:
|
|
- Test cases for normal operations
|
|
- Edge cases
|
|
- Error handling
|
|
- Comments explaining each test
|
|
|
|
provider: ollama
|
|
model: llama3.2
|