Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
日本語の概要は準備中です。原文の説明を表示しています。
Test frontend code: unit, component, E2E, visual regression, and accessibility tests with a sane pyramid. Use for reliable UI quality.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
A practical guide to frontend testing: the testing pyramid for UI (unit → component → E2E), visual regression, accessibility tests, and the habits that keep suites fast and trustworthy.
Frontend testing pyramid: many unit tests (pure logic: utils, hooks, reducers), component tests (render + interact: Testing Library), few E2E tests (critical user journeys: Playwright/Cypress), plus visual regression for UI fidelity and a11y checks in CI. The goal isn't coverage percentage — it's catching regressions in things users actually do.
Test behavior, not implementation: query by role/text like a user, not by component internals.
screen.getByRole('button', { name: 'Save' }). Mock network at the boundary (MSW), not internals.jest-axe, Playwright axe) — catches missing labels, contrast, invalid ARIA automatically.data-testid as a last resort; prefer role/text queries. Test IDs for elements with no good semantic query.1. Setup.
npm i -D vitest @testing-library/react @testing-library/user-event jsdom msw
npx playwright install # E2E browsers
2. Unit test (logic).
// utils/format.test.ts
import { formatCurrency } from './format';
test('formats USD', () => expect(formatCurrency(1234.5)).toBe('$1,234.50'));
3. Component test (behavior).
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
test('submits the form', async () => {
const onSubmit = vi.fn();
render(<LoginForm onSubmit={onSubmit} />);
await userEvent.type(screen.getByLabelText(/email/i), 'a@b.c');
await userEvent.type(screen.getByLabelText(/password/i), 'secret123');
await userEvent.click(screen.getByRole('button', { name: /log in/i }));
expect(onSubmit).toHaveBeenCalledWith({ email: 'a@b.c', password: 'secret123' });
});
4. E2E (critical journey).
// e2e/checkout.spec.ts
test('guest checkout', async ({ page }) => {
await page.goto('/products/widget');
await page.getByRole('button', { name: 'Add to cart' }).click();
await page.getByRole('link', { name: 'Checkout' }).click();
await expect(page.getByText('Order confirmed')).toBeVisible();
});
5. CI. Unit/component on every PR (fast); E2E on main + pre-release (slower); axe checks in both; visual regression on UI PRs.
await sleep(1000) = flakiness. Use proper waiting (Testing Library's findBy, Playwright's auto-waiting assertions).まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
日本語の概要は準備中です。原文の説明を表示しています。
Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.
日本語の概要は準備中です。原文の説明を表示しています。
Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.
日本語の概要は準備中です。原文の説明を表示しています。
Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.
日本語の概要は準備中です。原文の説明を表示しています。
Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.
日本語の概要は準備中です。原文の説明を表示しています。
Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.
日本語の概要は準備中です。原文の説明を表示しています。