搜索

PythonReactSEOPDF
GitHub Skill

test-triage

Debugs failing tests, flaky tests, and Node processes that won't exit after tests complete. Use when backend/shared/frontend tests fail or hang.

piquet-h☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Test triage

Use this skill when you are asked to:

  • Fix a failing test (local or CI).
  • Investigate a hanging test run (“tests pass but the process never exits”).
  • Identify what’s keeping Node alive (timers, sockets, handles).

Principles

  1. Logs first: capture the failing command + error output before proposing changes.
  2. Minimize the reproduction: run the smallest scope that reproduces the failure.
  3. Fix the root cause (common culprits: long timers without .unref(), open sockets, background watchers).

Canonical workflows

Backend test runs

Use the wrapper script to run a targeted backend test scope:

  • scripts/run-backend-tests.mjs

Default is unit tests (fast). Use --scope integration or --scope all when required.

“Node won’t exit” / hanging tests

Preferred workflow:

  1. Re-run the smallest test scope.
  2. If the process hangs, run the hang-diagnose wrapper:
    • scripts/diagnose-backend-hang.mjs
  3. If you confirm a long-lived timer is the culprit, apply the repo rule:
    • Any long setTimeout / setInterval must use .unref() unless explicitly required to keep the process alive.

Last reviewed: 2026-01-15

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!