使用方法
- 复制安装命令,在自己的智能体环境安装前先检查源码包。
- 从原始文档核对所需工具、凭据和支持的宿主。
- 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/rstackjs/agent-skills --skill rstest-debugging开始前需了解
- 安装不包含模型订阅、API 额度或访问文件的权限。
- 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。
Rstest debugging
Diagnose the measured lifecycle stage before changing configuration. Keep behavior and the test manifest fixed, change one variable at a time, and remove experiments that do not produce a repeatable benefit.
Workflow
- Establish comparable single-file and full-scope baselines with
references/performance-measurement.md. - Run
rstest --tracewhen supported and classify the cost as host build/startup, runtime load/setup/collect, test bodies/hooks, or CLI/report/teardown overhead. - Use
DEBUG=rstestfor resolved config and build output. For Rstest 0.11.7+ experimental per-test bundle coverage, followreferences/performance-measurement.md. Use Rsdoctor only after evidence points to the compiler. Use verbose reporting or a profiler only after narrowing to runtime files/cases. - If dependency loading or compilation is implicated, read
references/dependency-bundling.md. Compare the environment default,bundleDependencies: false, andbundleDependencies: true; neither bundling nor externalization is universally faster. - If a fully mocked heavy module still reaches the build graph, read
references/mocked-module-build-graph.mdbefore testing an exact external. - If assets, console output, pools, isolation, or memory dominate, read
references/runtime-output-memory.md. - Rerun the representative file and full scope. Keep a change only when behavior, discovery, snapshots, and coverage remain valid and the benefit survives repeated measurement. Remove traces, profiles, and
.rstestdebug artifacts created by the diagnosis before handing off.
Guardrails
- Use the project's installed Rstest for final claims. Label local checkout or unreleased diagnostic results separately.
- Keep Node version, test files, coverage, cache state, environment, workers, and command shape fixed while comparing.
- Do not add worker durations that overlap or subtract runner/build/tests values without verifying their lifecycle boundaries.
- Do not treat aggregate process-tree RSS as physical memory; it can double-count shared pages.
- Do not disable isolation, reduce coverage, silence failures, or change production/test semantics for a benchmark win.
- Do not stack speculative aliases, externals, compiler hooks, pool settings, or caches. Preserve only the measured minimum.
Handoff from migration
When invoked from migrate-to-rstest, first confirm that the Jest/Vitest and Rstest manifests match. If the migration intentionally adds tests, report same-scope performance separately from final expanded-scope performance.

