Skip to main content

authoring-tests

Write and run automated tests for Elements components including unit, accessibility, visual, SSR, and lighthouse tests. Use this skill whenever the user wants to write, create, update, or debug test files (.test.ts, .test.axe.ts, .test.visual.ts, .test.ssr.ts, .test.lighthouse.ts). Also trigger when the user asks about createFixture, removeFixture, elementIsStable, emulateClick, untilEvent, runAxe, visual baselines, theme testing, or test structure patterns like describe block naming.

소스 정보

저장소
NVIDIA/elements
최근 소스 활동
2026년 8월 12일 00:30
감지된 SKILL.md 언어
영어
스타
102
포크
19

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
authoring-tests
description
Write and run automated tests for Elements components including unit, accessibility, visual, SSR, and lighthouse tests. Use this skill whenever the user wants to write, create, update, or debug test files (.test.ts, .test.axe.ts, .test.visual.ts, .test.ssr.ts, .test.lighthouse.ts). Also trigger when the user asks about createFixture, removeFixture, elementIsStable, emulateClick, untilEvent, runAxe, visual baselines, theme testing, or test structure patterns like describe block naming.
# Authoring Tests You MUST review @projects/site/src/docs/internal/guidelines/testing.md before making any testing changes. ## When to Use This Skill - Creating new test files for components (`.test.ts`, `.test.axe.ts`, `.test.visual.ts`, `.test.ssr.ts`, `.test.lighthouse.ts`) - Debugging test failures or updating existing tests - Understanding testing utilities from `@internals/testing` - Setting up test configurations or HTML templates - Writing tests that follow project patterns ## Test Type Guidelines Read the specific guideline based on the test type you're working with: - **Unit Tests (`.test.ts`)**: Read [testing-unit.md](/projects/site/src/docs/internal/guidelines/testing-unit.md) - covers `createFixture`, `elementIsStable`, event testing - **Accessibility Tests (`.test.axe.ts`)**: Read [testing-accessibility.md](/projects/site/src/docs/internal/guidelines/testing-accessibility.md) - covers axe-core usage, WCAG compliance - **Visual Tests (`.test.visual.ts`)**: Read [testing-visual.md](/projects/site/src/docs/internal/guidelines/testing-visual.md) - covers Playwright screenshots, theme testing - **SSR Tests (`.test.ssr.ts`)**: Read [testing-ssr.md](/projects/site/src/docs/internal/guidelines/testing-ssr.md) - covers server-side rendering compatibility - **Lighthouse Tests (`.test.lighthouse.ts`)**: Read [testing-lighthouse.md](/projects/site/src/docs/internal/guidelines/testing-lighthouse.md) - covers performance, accessibility scores ## Key Principles 1. **Test Isolation**: Each test should be independent with proper setup/teardown using `createFixture` and `removeFixture` 2. **Wait for Stability**: Always use `elementIsStable()` before making assertions on Lit components 3. **Comprehensive Coverage**: All new components require unit, accessibility, and visual tests at minimum 4. **Real User Events**: Use `emulateClick` and `untilEvent` for realistic event testing 5. **Theme Testing**: Visual tests should cover both light and dark themes ## References - [Testing Overview](/projects/site/src/docs/internal/guidelines/testing.md) - [Unit Testing](/projects/site/src/docs/internal/guidelines/testing-unit.md) - [Accessibility Testing](/projects/site/src/docs/internal/guidelines/testing-accessibility.md) - [Lighthouse Testing](/projects/site/src/docs/internal/guidelines/testing-lighthouse.md) - [SSR Testing](/projects/site/src/docs/internal/guidelines/testing-ssr.md) - [Visual Testing](/projects/site/src/docs/internal/guidelines/testing-visual.md) - [Vite Internals](/projects/internals/vite/README.md)
GitHub에서 보기