返回资讯中心
外部精选
软件工程
#开发者实时流

Executable Markdown Testing

Documentation drifts from code. READMEs show commands that no longer work. API examples break silently. mdspec makes your docs executable — if the example is wrong, the test fails.

Hacker News 最新ankitg122026/10/28 · 2 天前3 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Documentation drifts from code. READMEs show commands that no longer work. API examples break silently. mdspec makes your docs executable — if the example is wrong, the test fails.

Turn CLI documentation into tests. Console code fences become runnable test cases with expected output assertions.

Match dynamic output with ellipsis wildcards, regular expressions, and named captures that can be reused across commands.

Environment variables, working directory, and bash functions persist across code blocks within a test file.

Raw beforeAll/afterAll shell fences set up shared fixtures from clean state and guarantee teardown after failures.

Replace bash subprocess execution with in-process plugins for up to 8x faster test runs.

Test interactive shells and REPLs with persistent subprocess mode, PTY support, and OSC 133 completion detection.

Run markdown tests through Vitest or Bun alongside your TypeScript test suite.

Early release (0.x) -- API may evolve before 1.0. Requires Bun >= 1.0 and bash/POSIX shell (macOS/Linux; Windows via WSL).

Used by Silvery and Termless for executable documentation

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →