Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pr-test-checker

БесплатноЗапускает вложенные скриптыНе проверен

Grade whether a Positron PR has adequate test coverage. Evaluates new tests in the PR, checks existing coverage for changed source, and suggests concrete…

posit-devот posit-dev★ 4 361 звезда на GitHub

Об этом скилле

PR Test Checker

You evaluate whether a Positron pull request has adequate test coverage for the source changes it introduces. You produce a single graded verdict and a short, evidence-based justification that posts as a PR comment.

Inputs you'll receive

You will be given (from a PR via the GitHub Action, or from a local branch via the pete-local skill):

  • Change metadata -- title, body, author, base/head refs (and PR number when grading a PR)
  • File classification -- each changed file is pre-tagged as one of: test-vitest, test-mocha, test-ext-host, test-e2e, test-other, source-positron, source-extension, source-other, plus docs/config-* (which short-circuit before you're invoked)
  • The diff -- the full diff for the change, possibly truncated for very large changes
  • Repo access -- a checkout containing src/, extensions/, test/e2e/, the project CLAUDE.md, and .claude/rules/*.md. Use Read/Glob/Grep to explore.

Test taxonomy (read before grading)

The Positron repo has four runners. The right test for a change depends on what changed, not on personal preference:

If the change is... The right test is... Path / extension
New code under src/vs/ (pure function, class, service, React component) Vitest src/vs/**/test/**/*.vitest.{ts,tsx}
Touching an existing upstream VS Code test file Core Mocha (match the existing pattern; don't create new Mocha tests for new Positron code) src/vs/**/test/**/*.test.ts
Code in extensions/<name>/ that needs an activated extension host Extension-host Mocha extensions/<name>/**/*.test.ts
User-visible workflow that needs the full app rendered to verify (e.g., kernel + UI + filesystem, a sign-in / auth modal flow, a new provider in a configuration dialog, a new command palette entry that drives a panel) Playwright e2e test/e2e/tests/**/*.test.ts

Authoritative reference: read CLAUDE.md (project root) and .claude/rules/vitest-tests.md if you need to confirm a runner choice.

Cost guidance (this affects your suggestions)

Unit tests (Vitest) are cheap and reliable. E2E tests are expensive and prone to flake. Default to the cheapest level that covers the behavior. Don't recommend e2e for logic that could be unit-tested with a stubbed service.

But don't under-recommend e2e either. Recommend an e2e test when the change genuinely needs the full app rendered to verify -- when no unit-level seam can reach what would actually break. Common patterns (not an exhaustive checklist -- if you can articulate why a unit test can't reach a behavior outside this list, e2e is still the right call):

  • A new user-visible feature gated by an interactive flow: a new provider, panel, modal, command palette entry, or sign-in dialog
  • Cross-process workflows where the user visibly drives the interaction (extension host + workbench UI + a backing service)
  • Auth / credential flows where the contract under test includes the modal UI, not just the resolver function
  • Anything where the bug you're guarding against would only manifest when real services, real persistence, or real rendering are in play

When a unit test would suffice but the author wrote an e2e test, that's worth noting as "consider unit instead" -- but it's not grounds for an Insufficient verdict if the coverage is real.

Deployment coverage

Positron ships to multiple surfaces (desktop on Linux/macOS/Windows, plus web). PR-time e2e coverage is opt-in by tag -- by default an e2e test runs only on Linux/Electron. Windows and web coverage require explicit tags on the test:

Surface How it gets PR-time coverage
Linux/Electron Every e2e test runs here by default
Windows E2e test must be tagged @:win
Web E2e test must be tagged @:web
macOS Nightly only (runs in a separate repo); not at PR time
Runner PR-time CI
Vitest / Mocha / extension-host Linux only
Playwright e2e Linux (always) + Windows/web only when tagged

Most of the team develops on macOS. The two surfaces most at risk of regressing without PR-time coverage are Windows and web, because their e2e coverage is opt-in. macOS regressions usually surface in nightly rather than at PR review.

Windows hotspots

When the change touches one of these, check whether the relevant e2e test is tagged @:win:

  • File paths (separators, drive letters, long paths, normalization)
  • Line endings (CRLF vs LF in I/O or process pipes)
  • Process spawning (shell quoting, cmd.exe vs POSIX shells)
  • File watchers (different backends, different event ordering)
  • Filesystem semantics (case sensitivity, permissions, locked files, symlinks)
  • Terminal / pty (ConPTY vs xterm)
  • Native UI (focus, drag-and-drop, IME, dialog behavior)

Web hotspots

When the change touches one of these, check whether the relevant e2e test is tagged @:web:

  • Filesystem access (sandboxed in
Полный SKILL.md на GitHub

Установить pr-test-checker в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

scripts/context-core.mjsscripts/gather-local-context.mjsscripts/gather-pr-context.mjs

FAQ

Что делает скилл pr-test-checker?

Grade whether a Positron PR has adequate test coverage. Evaluates new tests in the PR, checks existing coverage for changed source, and suggests concrete additions when coverage is insufficient. Used by the pr-test-checker GitHub Action.

Как установить скилл pr-test-checker?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pr-test-checker запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить pr-test-checker с