一键导入
test
Run tests and coverage for dart_node packages. Automatically detects which packages to test based on changed files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run tests and coverage for dart_node packages. Automatically detects which packages to test based on changed files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Builds all artifacts for this repo. Use when the user asks to build, compile, or produce artifacts, or when verifying that the project compiles cleanly.
Prepares the current branch for CI by running the exact same checks locally, fixing issues at each step. Use before pushing a branch or when the user wants to verify the branch will pass CI.
Searches for duplicate code, duplicate tests, and dead code, then safely merges or removes them. Use when the user says "deduplicate", "find duplicates", "remove dead code", "DRY up", or "code dedup". Requires test coverage — refuses to touch untested code.
Fix a bug using test-driven development. Use when the user reports a bug, describes unexpected behavior, wants to fix a defect, or says something is broken. Enforces a strict test-first workflow where a failing test must be written and verified before any fix is attempted.
Formats all code in this repo using dart format. Use when the user asks to format code, fix formatting, or before committing changes.
Runs all linters and format checks, then fixes any issues found. Use when the user asks to lint, check code quality, or fix linting errors.
| name | test |
| description | Run tests and coverage for dart_node packages. Automatically detects which packages to test based on changed files. |
| argument-hint | [--tier N] [--all] [package...] |
| disable-model-invocation | true |
| allowed-tools | Bash, Read, Grep, Glob |
If $ARGUMENTS specifies a tier or package, use that. Otherwise, detect which packages were affected by recent changes:
git diff --name-only main
Map changed files to packages:
| Changed path | Test target |
|---|---|
packages/dart_node_core/ | packages/dart_node_core |
packages/dart_node_express/ | packages/dart_node_express |
packages/dart_node_ws/ | packages/dart_node_ws |
packages/dart_node_better_sqlite3/ | packages/dart_node_better_sqlite3 |
packages/dart_node_mcp/ | packages/dart_node_mcp |
packages/dart_node_react/ | packages/dart_node_react |
packages/dart_node_react_native/ | packages/dart_node_react_native |
packages/dart_logging/ | packages/dart_logging |
packages/reflux/ | packages/reflux |
packages/dart_jsx/ | packages/dart_jsx |
examples/frontend/ | examples/frontend |
examples/markdown_editor/ | examples/markdown_editor |
examples/reflux_demo/ | examples/reflux_demo/web_counter |
tools/ or root config | Run --all |
If a Tier 1 package changed, also run its downstream dependents in Tier 2/3.
Specific packages (preferred — faster):
./tools/test.sh packages/dart_node_core packages/dart_node_express
Full tier:
./tools/test.sh --tier 1
Everything (use --all arg or when root files changed):
./tools/test.sh
For each Node package that was tested, run the coverage tool:
cd packages/<name> && dart run ../dart_node_coverage/bin/coverage.dart
Node packages (use coverage CLI): dart_node_core, dart_node_express, dart_node_ws, dart_node_better_sqlite3, dart_node_mcp, dart_node_react_native
Browser packages (use dart test -p chrome): dart_node_react
Standard packages (use dart test --coverage): dart_logging, reflux
Minimum coverage: 80%. If below threshold, read coverage/lcov.info and identify uncovered lines.
dart_logging, dart_node_corereflux, dart_node_express, dart_node_ws, dart_node_better_sqlite3, dart_node_mcp, dart_node_react_native, dart_node_reactexamples/frontend, examples/markdown_editor, examples/reflux_demo/web_counterlogs/<package>.log and diagnose