跳到主要内容
知仓学习社ZHICANG

vitest-runner

Run Vitest tests and parse results into actionable output.

不碰外部(只输出文字)无严重或高危命中notque/vexjoy-agent

它会碰到什么

扫了多少1 个文本文件,3 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Vitest runner

Run existing Vitest tests and report results. A check-only request does not authorize changing tests, assertions, dependencies, or configuration.

Run

Read repository instructions and package scripts. Check package.json, vitest.config., and vite.config. to confirm Vitest and its test configuration. Use the installed project version; avoid implicit npx downloads. If Vitest is unavailable, report setup needed rather than installing it.

Use the repository test command or these defaults. Always use run; bare vitest can enter watch mode.

| Scope | Command |

|---|---|

| Whole configured suite | npx vitest run --reporter=verbose 2>&1 |

| File or directory | npx vitest run path/to/test.ts 2>&1 |

| Test-name pattern | npx vitest run -t "pattern" 2>&1 |

| Requested coverage | npx vitest run --coverage 2>&1 |

Capture the process exit code and full output. Report pass/fail, checked scope, passed/failed/skipped counts, and duration. For failures retain the file, full test name, assertion difference, and relevant stack location. Keep complete logs available; show useful excerpts instead of every passing test. Nonzero exit is failure, including discovery or tool failures; partial output is not a passing run.

Recovery

  • Vitest missing/node_modules absent: inspect dependencies. Setup may require npm install or npm install -D vitest; use the repository package manager during authorized setup.
  • No test files: check file naming (.test.ts, .spec.ts, *.test.js) and configured include/exclude globs. Report discovery failure; do not change config to mask it.
  • Missing DOM environment: inspect environment for jsdom or happy-dom. Suggest the matching devDependency (npm install -D jsdom or npm install -D happy-dom); @testing-library/jest-dom adds matchers, not an environment.
  • Out of memory: diagnose with directory batches such as npx vitest run src/unit/, --pool=forks, or --shard=1/N when supported by the installed version. A full-suite claim requires all batches/shards; a diagnostic subset is not full verification.
  • Failing assertions: report the mismatch. When fixing is authorized, determine whether implementation or test is wrong; never weaken assertions merely to make the run green.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 419
本站分层T2
该仓技能数122
原文件路径skills/testing/vitest-runner/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 122 个技能