跳到技能内容
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
词映 AI导航
工具库Skills 技能
我的收藏
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
Skills directory/kid-sid/codex-spellbook/testing

Codex Spellbook Testing for Parameterized Boundary Cases

Structure tests around setup, one action, and an observable result. Consolidate repeated cases when they exercise the same behavior and name each input so failures are useful.

中文

Install in Codex

Codex and a project with an existing test runner. The Python example uses pytest, but the target project can use its native runner.

  1. Copy the pinned `skills/testing/` directory into `.agents/skills/testing/` in the target project.
  2. Open the project in Codex and invoke `$testing` for the specific test change.

Example task

For a practice price function, cover no discount, a ten percent discount, and a rounding boundary. Ask for a parameterized test with meaningful case labels.

What to check

Expect three labeled cases asserting the final price. A failure identifies the specific case and its observed value.

Original SKILL.md on GitHub · Updated 2026-11-13

Frequently asked question

Should a deterministic function be mocked?

Test its output directly. Use test doubles at unstable external boundaries.

Related skills from this repository

  • Codex Validate External JSON in Strict TypeScript with Zod
Browse Codex skills in the Chinese directory
词映 AI 导航Skills 技能
工具分类全部工具已本地化技能选型指南AI 快讯