Install any skill in seconds. Free to start, no credit card required.
Get Started Free →rohitg00/tdd-mastery
Test-driven development workflow with Red-Green-Refactor cycle across languages
Passed 20 of 23 test cases with the skill, and 18 of 23 without it.
2 fixed18 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
When designing unit tests for a service that interacts with external APIs, database repositories, and internal domain logic, what components should be mocked versus kept concrete?
| Checked | Without skill | With skill |
|---|---|---|
| Recommends mocking external boundaries such as HTTP clients, databases, file systems, and clocks | Passed | Passed |
| Advises against mocking the unit under test itself | Missed | Passed |
The instructions your model reads when the skill loads.
Never write production code without a failing test first. Each cycle should take 2-10 minutes.
Use the Arrange-Act-Assert pattern consistently:
Arrange: Set up test data and dependencies
Act: Execute the behavior under test
Assert: Verify the expected outcome
Name tests as test_<unit>_<scenario>_<expected_result> or it("should <behavior> when <condition>").
describe("OrderService", () => {
it("should apply discount when order exceeds threshold", () => {
const order = createOrder({ items: [{ price: 150, qty: 1 }] });
const result = applyDiscount(order, { threshold: 100, percent: 10 });
expect(result.total).toBe(135);
});
it("should throw when applying discount to empty order", () => {
const order = createOrder({ items: [] });
expect(() => applyDiscount(order, defaultDiscount)).toThrow(EmptyOrderError);
});
});
Use vi.fn() / jest.fn() for mocks. Prefer dependency injection over module mocking. Use beforeEach for shared setup, never share mutable state between tests.
test cases passed, vs 18 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.