360 Secure SkillHub
360 安全技能中心

ts4

该 Skill 提供 TS4 TypeScript 测试框架的命令行入口,通过 scripts/test-runner.sh 支持执行单元测试与快照测试、生成 HTML 与 lcov 覆盖率报告,以及查看套件状态与通过/失败数量。元数据声明仅适用于 Linux 并需要执行权限。

kleberbaum
kleberbaum
热度 64.14
最近更新 2026-05-11 17:26:18
分类:开发依赖:代码执行应用场景:调试排错 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add ts4
Metadata
name
ts4
description
TS4 namespace for Netsnek e.U. TypeScript testing framework. Unit testing, snapshot testing, coverage reporting, and mutation testing.
user-invocable
true
version
0.1.0
metadata
{"openclaw":{"os":["linux"],"permissions":["exec"]}}

Testing with TS4

TS4 is the Netsnek e.U. TypeScript testing framework. Run unit tests, snapshots, coverage reports, and mutation tests from a single CLI.

Test Types

  • Unit — Isolated function and module tests
  • Snapshot — Output comparison for UI and serialization
  • Coverage — Line, branch, and function metrics
  • Mutation — Fault injection to verify test quality

CLI Reference

Flag Effect
--run Execute the full test suite
--coverage Produce coverage report (HTML + lcov)
--status Show suite status, last run, pass/fail count

Walkthrough

# Run all tests
./scripts/test-runner.sh --run

# Generate coverage
./scripts/test-runner.sh --coverage

# Check status
./scripts/test-runner.sh --status