スキル一覧に戻る
djimontyp

testing

by djimontyp

0🍴 0📅 2026年1月11日
GitHubで見るManusで実行

SKILL.md


name: testing description: pytest, Vitest, Playwright testing patterns for Pulse Radar.

Testing Skill

Test Coverage

LayerCountTools
Backend521 testspytest, pytest-asyncio
Frontend51 testsVitest, Testing Library
E2E13 specsPlaywright
Visual65 storiesStorybook

Backend Test Pattern

@pytest.mark.asyncio
async def test_atom_service_create(db_session: AsyncSession):
    service = AtomService(AtomCRUD(db_session))
    atom = await service.create(AtomCreate(content="test", atom_type=AtomType.INSIGHT))

    assert atom.id is not None, f"Atom ID missing"
    assert atom.status == AtomStatus.DRAFT, f"Expected DRAFT, got {atom.status}"

Frontend Test Pattern

describe('BulkActionsToolbar', () => {
  it('should call onSelectAll when clicked', () => {
    const onSelectAll = vi.fn();
    render(<BulkActionsToolbar onSelectAll={onSelectAll} />);

    fireEvent.click(screen.getByRole('checkbox'));
    expect(onSelectAll).toHaveBeenCalledTimes(1);
  });
});

E2E Test Pattern

test.describe('Dashboard', () => {
  test.beforeEach(async ({ page }) => {
    await page.goto('/dashboard');
    await page.waitForLoadState('networkidle');
  });

  test('loads successfully', async ({ page }) => {
    await expect(page.locator('h1:has-text("Dashboard")')).toBeVisible();
  });
});

Critical Rules

  1. Assertion messages required

    assert x == y, f"Expected {y}, got {x}: {context}"
    
  2. Never sabotage tests — no skip, no comment out, no always-green

  3. Test must fail on breakage — if UI breaks and test passes, test is bad

References

  • @references/pytest.md — Fixtures, factories, async patterns
  • @references/vitest.md — Component testing, hook testing
  • @references/playwright.md — E2E flows, accessibility testing

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です