From ndf
Generate unit tests, integration tests, and test fixtures for code. Supports Jest, Mocha, pytest. Use when writing tests or improving test coverage. This skill provides automated test generation: - Unit tests with AAA pattern (Arrange, Act, Assert) - Integration tests for APIs and databases - Test fixtures and mocks - Edge case identification Triggers: "generate tests", "create unit test", "add test coverage", "write tests", "テスト生成", "テストコード作成", "カバレッジ向上"
npx claudepluginhub takemi-ohama/ai-plugins --plugin ndfThis skill is limited to using the following tools:
corderエージェントが既存のコードに対してテストを自動生成する際に使用します。Jest、Mocha、pytestなどの主要なテストフレームワークに対応。
Generates unit, integration, component, and e2e test suites with mocking strategies, edge case coverage, descriptive naming, and CI integration patterns. Activates on 'write tests', 'unit tests', 'mocking' requests.
Writes TDD tests supporting Jest, Cypress, Detox, PHPUnit, PyTest, and Go testing. Adds unit, integration, E2E tests to improve coverage on existing code.
Writes unit tests with high coverage using Jest, pytest, JUnit, RSpec following AAA pattern. Use for functions, classes, components, TDD, refactoring, coverage.
Share bugs, ideas, or general feedback.
corderエージェントが既存のコードに対してテストを自動生成する際に使用します。Jest、Mocha、pytestなどの主要なテストフレームワークに対応。
test('should do something', () => {
// Arrange: テストデータを準備
const input = { ... };
const expected = { ... };
// Act: テスト対象を実行
const result = functionUnderTest(input);
// Assert: 結果を検証
expect(result).toEqual(expected);
});
node scripts/generate-tests.js src/utils/calculator.js
| DO | DON'T |
|---|---|
| AAAパターンに従う | テストの重複 |
| 1テスト = 1アサーション | 実装の詳細に依存 |
| エッジケースをテスト | 過剰なモック |
| 独立したテスト(実行順序に依存しない) | 外部依存(ネットワーク等) |
| わかりやすいテスト名 | テストのテスト |
| ファイル | 内容 |
|---|---|
01-patterns.md | AAAパターン、エッジケース、モック・スパイの詳細 |
02-examples.md | ユニットテスト、API統合テストの実装例 |