360 Secure SkillHub
360 安全技能中心

hgbvhjgfvgh

该 Skill 依据 .test.ts、.spec.ts、__tests__/ 等命名约定把源文件与测试文件对应起来,找出完全没有测试的源文件、有测试但导出函数或类未被覆盖的情况,以及导入已不存在模块的孤立测试;随后按风险分级(公共 API、数据变更、通用工具、内部辅助)排序,输出覆盖缺口报告,为每个缺口给出源文件、未测导出与建议的测试大纲。

分类:开发
jk625x
jk625x
热度 16.56
最近更新 2026-06-04 12:51:58

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add jk625x/ljkhlk
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
test-coverage-report
description
Analyze test coverage gaps by comparing test files against source modules to identify untested code paths and critical functions.
version
0.3.0
displayName
Test Coverage Report
metadata
{"openclaw":{"author":"xd-test","consumers":[{"name":"xdclaw","minVersion":"1.2.0"}],"permissions":{"filesystem":["read"],"network":false,"shell":true}}}

Test Coverage Report

Identify test coverage gaps by analyzing the relationship between source modules and their corresponding test files.

Analysis Steps

  • Map each source file to its test file(s) using naming conventions (.test.ts, .spec.ts, __tests__/).
  • Identify source files with no corresponding test file.
  • For files with tests, check which exported functions and classes have test coverage.
  • Prioritize coverage gaps by risk: public API surface, error handling paths, and data mutation functions.
  • Check for test files that import from modules that no longer exist (orphaned tests).

Risk Scoring

  • Critical: Public API handlers with no test coverage.
  • High: Data mutation functions (create, update, delete) without tests.
  • Medium: Utility functions used by multiple modules without tests.
  • Low: Internal helper functions with single callers.

Output

Provide a coverage gap report sorted by risk level. For each gap, show the source file, the untested exports, and a suggested test outline.