원클릭으로
test-changes
Run Jest unit tests for files changed in the current branch
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Run Jest unit tests for files changed in the current branch
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Generate a concise PR description from code changes, following the repo's PR template
Automatically resolve CVEs by checking GitHub issues, verifying presence in codebase, and attempting various remediation strategies while documenting the process.
Automatically retry failed required CI checks on GitHub PRs, with smart waiting and filtering logic
| name | test_changes |
| description | Run Jest unit tests for files changed in the current branch |
| arguments | [{"name":"scope","description":"What to diff against: 'branch' (vs base branch, default), 'staged' (staged only), 'unstaged' (unstaged only), 'all-local' (staged + unstaged)","required":false},{"name":"base","description":"Base ref to diff against when scope=branch (default: auto-detects remote main/mainline)","required":false}] |
Find and run Jest tests relevant to locally changed files.
Based on the scope argument (default: branch):
# scope=branch (default): all changes since diverging from base branch
# Auto-detect base: use origin/main or origin/mainline, whichever exists
base="${base:-$(git rev-parse --verify origin/main 2>/dev/null && echo origin/main || echo origin/mainline)}"
git diff --name-only --diff-filter=ACMR "$base"...HEAD
# Also include uncommitted changes on top
git diff --name-only --diff-filter=ACMR HEAD
# scope=staged
git diff --cached --name-only --diff-filter=ACMR
# scope=unstaged
git diff --name-only --diff-filter=ACMR
# scope=all-local
git diff --name-only --diff-filter=ACMR HEAD
Filter to only .ts, .tsx, .js, .jsx files. Exclude files under target/, build/, node_modules/.
From the changed file list:
*.test.ts, *.test.tsx, *.test.js, *.test.jsx → run directly.For each changed source file (e.g., src/plugins/foo/bar.ts), check if any of these exist:
src/plugins/foo/bar.test.tssrc/plugins/foo/bar.test.tsxsrc/plugins/foo/bar.test.jsUse the first match found.
For any changed source file with no matching test file, print a warning:
⚠ No test file found for: src/plugins/foo/bar.ts
This is informational only — do not fail or block.
Combine all discovered test files (from changed test files + matched test files for source changes), deduplicate, then run:
yarn test:jest path/to/test1.test.ts path/to/test2.test.tsx ...
If no test files are found at all, report that and exit cleanly.
Summarize: