From glincker-claude-code-marketplace
Generates unit tests for functions and classes in Python, JavaScript/TypeScript, Go, Rust, and Java using pytest, Jest/Vitest, and JUnit. Covers happy paths, edge cases, and errors with AAA pattern.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-4 --plugin glincker-claude-code-marketplaceThis skill is limited to using the following tools:
Automatically generates comprehensive unit tests for your code, supporting multiple programming languages and testing frameworks.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Automatically generates comprehensive unit tests for your code, supporting multiple programming languages and testing frameworks.
This skill creates high-quality unit tests by:
When asked to generate tests:
Identify target code:
Detect language and framework:
Analyze logic:
Create tests covering:
Happy Path Tests:
Edge Cases:
Error Conditions:
Integration Points:
Follow framework-specific conventions:
Python (pytest):
import pytest
from module import function_to_test
class TestFunctionName:
def test_happy_path(self):
# Arrange
input_data = "valid input"
# Act
result = function_to_test(input_data)
# Assert
assert result == expected_value
def test_edge_case_empty_input(self):
with pytest.raises(ValueError):
function_to_test("")
JavaScript (Jest):
describe('functionName', () => {
test('should handle valid input', () => {
// Arrange
const input = 'test';
// Act
const result = functionName(input);
// Assert
expect(result).toBe(expected);
});
test('should throw error on invalid input', () => {
expect(() => functionName(null)).toThrow();
});
});
Ensure generated tests:
Present the generated tests and:
User Request: "Generate tests for the calculate_discount function"
Source Code:
def calculate_discount(price: float, discount_percent: int) -> float:
if discount_percent < 0 or discount_percent > 100:
raise ValueError("Discount must be between 0 and 100")
return price * (1 - discount_percent / 100)
Generated Tests:
import pytest
from shopping import calculate_discount
class TestCalculateDiscount:
def test_valid_discount(self):
"""Test normal discount calculation"""
result = calculate_discount(100.0, 20)
assert result == 80.0
def test_zero_discount(self):
"""Test with no discount"""
result = calculate_discount(100.0, 0)
assert result == 100.0
def test_full_discount(self):
"""Test with 100% discount"""
result = calculate_discount(100.0, 100)
assert result == 0.0
def test_negative_discount_raises_error(self):
"""Test that negative discount raises ValueError"""
with pytest.raises(ValueError, match="between 0 and 100"):
calculate_discount(100.0, -10)
def test_discount_over_100_raises_error(self):
"""Test that discount > 100 raises ValueError"""
with pytest.raises(ValueError, match="between 0 and 100"):
calculate_discount(100.0, 150)
def test_zero_price(self):
"""Test with price of 0"""
result = calculate_discount(0.0, 50)
assert result == 0.0
User Request: "Create unit tests for the UserValidator class"
Generated Approach:
When using this skill:
Adapts to detected setup:
| Language | Framework | Test File Location |
|---|---|---|
| Python | pytest | tests/test_*.py |
| Python | unittest | tests/test_*.py |
| JavaScript | Jest | __tests__/*.test.js |
| TypeScript | Jest | __tests__/*.test.ts |
| Go | testing | *_test.go (same dir) |
| Rust | built-in | tests/ or inline |
Want to add support for a new language or framework?
Apache License 2.0 - See LICENSE
GLINCKER Team