Skip to main content

write-e2e-cases

Use when adding or updating Rsdoctor end-to-end tests in `e2e/cases/`, including new feature coverage, bug reproduction, and regression prevention.

소스 정보

저장소
web-infra-dev/rsdoctor
최근 소스 활동
2026년 8월 31일 08:03
감지된 SKILL.md 언어
영어
스타
1,151
포크
107

설치 방법

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

소스 파일 검토

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

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
write-e2e-cases
description
Use when adding or updating Rsdoctor end-to-end tests in `e2e/cases/`, including new feature coverage, bug reproduction, and regression prevention.
# Write E2E cases Rsdoctor E2E tests use **Playwright** and live under `e2e/cases/`. Each bundler has its own directory: - `e2e/cases/doctor-rspack/` — tests using Rspack compilation - `e2e/cases/doctor-rsbuild/` — tests using Rsbuild - `e2e/cases/doctor-rspeedy/` — tests using Rspeedy ## Steps 1. Review uncommitted git changes to define test scope and target behavior. 2. Read `e2e/README.md` and follow its conventions. 3. Use helpers from `@scripts/test-helper` (for example `compileByRspack`) to compile fixtures. Do **not** call bundler APIs directly. 4. Add Playwright test files under the appropriate `e2e/cases/doctor-*` directory, following existing patterns. 5. Test fixtures (source files, loaders, configs) go in `fixtures/` subdirectories inside each case directory. 6. Keep assertions focused and readable; avoid redundant setup and checks. 7. Run `pnpm e2e` from the repository root to validate. ## Case structure - Each test file creates an Rsdoctor plugin instance (e.g., `createRsdoctorPlugin` from a local `test-utils.ts`), compiles a fixture via `compileByRspack`, and asserts on the SDK store data. - Fixtures are plain JS/TS files and loaders in `fixtures/` — not full application directories. - Use `@rsdoctor/core/plugins` for `getSDK` / `setSDK` when inspecting analysis results. ## Constraints - If tests can pass only after source-code changes, do not change source code directly. Explain the required source change and ask the user before proceeding.
GitHub에서 보기