跳到正文
cccskills
免费在 GitHub 公开

test-quality

Write or review Cataclysm-BN automated tests that produce repeatable results. It guides fixture selection, controls for time and global state, reproducing random failures, and matching CI test runs so a fix is checked under the same conditions.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Write or review Cataclysm-BN tests that avoid flakes, use deterministic fixtures, and clean up global state.

cataclysmbn/Cataclysm-BN星标 1,289(GitHub 1,289 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • Adding a repeatable automated test for a game behavior
  • Reviewing a test that fails intermittently
  • Checking a test fix against the same CI shard

包含的文件(1)

  • SKILL.md1.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Test Quality

Use when adding or changing automated tests.

Gates

  • Test one behavior contract, not incidental implementation details.
  • Use deterministic fixtures from data/mods/TEST_DATA for data with random, balance, or evolving behavior.
  • Avoid assertions that rely on probability, wall-clock time, locale, file order, or current global options unless the test pins them.
  • Reproduce reported flakes with the failing --rng-seed before accepting the fix.
  • When CI test jobs fail, inspect the job log for the exact test command, filters, shard split, user-dir, order-sensitive included tests, --rng-seed, and backend flags. Run that same shard command on the final rebased HEAD before declaring the fix validated; do not substitute a narrower tag filter or a different full-test command.
  • Before pushing test fixes that touch global state, NPCs, maps, overmaps, player position, RNG, options, or fixtures, run both the relevant focused test and the CI-equivalent shard/full command that can expose state bleed from earlier tests.
  • Keep Lua/C++ integration tests on real bound objects when the binding behavior is under test.
  • Expected DebugLog(DL::Error, ...) still makes the test process fail even when assertions pass. Use capture_debug_errors_during for the injected failure only and assert its exact messages; never clear the global observed-error flag or disable the test runner's error check.

Cleanup

  • Restore global state with restore_on_out_of_scope for calendar, options, globals, and singleton state.
  • Use clear_map() and explicit player placement when map contents matter.
  • Do not leave creatures, items, hooks, worlds, temp files, or option changes that can affect later tests.
  • Prefer new TEST_DATA fixtures over mutating base-game data in the test body.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use this skill to expose Cataclysm-BN game functions and utilities to Lua. It guides you through organizing functions into libraries, registering constants and callbacks, documenting the API, and handling errors so Lua scripts can use the new bindings.

中文简介正在准备中。当前显示英语简介。

  • Expose game or map functions to Lua
  • Add constants or utility functions to a Lua library
  • Let Lua scripts register callbacks
cataclysmbn/Cataclysm-BN12892026年10月27日 更新

Expose complex C++ classes to Lua by adding bindings for methods, inheritance, constructors, properties, and operators. The skill also guides ownership handling and registration so Lua scripts can use the intended class interface.

中文简介正在准备中。当前显示英语简介。

  • Exposing a C++ class to Lua
  • Binding inherited class methods
  • Adding constructors and properties
cataclysmbn/Cataclysm-BN12892026年10月27日 更新

Add Lua bindings that let Cataclysm-BN scripts access simple C++ types, including string IDs, enums, and basic read-only classes. The skill guides documentation macros, registration in the appropriate source file, and build and in-game checks.

中文简介正在准备中。当前显示英语简介。

  • Exposing a C++ string ID to Lua
  • Registering an enum for Lua scripts
  • Making a basic read-only C++ type available to Lua
cataclysmbn/Cataclysm-BN12892026年10月27日 更新

Generate and synchronize player-facing changelog files across English, Korean, and Japanese from a Git reference range. It groups related changes, organizes featured updates and fixes, and preserves localized labels and relevant media.

中文简介正在准备中。当前显示英语简介。

  • Preparing changelogs between two Git refs
  • Updating English, Korean, and Japanese release notes
  • Grouping related player-facing changes
cataclysmbn/Cataclysm-BN12892026年10月27日 更新

Create or update Deno and TypeScript scripts for Cataclysm-BN, following the project’s conventions. Use it for command-line tools, data migrations, code or documentation generators, Git hooks, and other development utilities.

中文简介正在准备中。当前显示英语简介。

  • Creating a Deno command-line utility
  • Writing a data migration script
  • Generating code or documentation
cataclysmbn/Cataclysm-BN12892026年10月27日 更新

Use this skill when the same English text needs different translations in different parts of an application. It adds gettext context at the source, updates affected PO entries, and guides validation of translations and formatting checks for the touched locale.

中文简介正在准备中。当前显示英语简介。

  • Separate translations for an ambiguous label
  • Add context to translated JSON strings
  • Update and validate affected PO entries
cataclysmbn/Cataclysm-BN12892026年10月27日 更新

查看 cataclysmbn 的全部技能

报告此技能的问题