@antithesishq/bombadil

中文文档
0.7.10发布于 2026/10/21MITTypeScript零依赖构建来源已验证近 30 天下载 31.6万

Property-based testing tool for web UIs

原始使用文档
文档目录3 节
  1. Install
  2. Usage
  3. Documentation

@antithesishq/bombadil

Version

Bombadil is property-based testing for web UIs, autonomously exploring and validating correctness properties, finding harder bugs earlier.

Install

npm install --save-dev @antithesishq/bombadil

Usage

Add a script to your package.json:

{
  "scripts": {
    "test": "bombadil browser test https://your-app.example.com"
  }
}

Then run it with npm test. This also gives you TypeScript type definitions for writing specifications.

Write custom properties:

import { always, eventually, extract } from "@antithesishq/bombadil/browser";

const title = extract((state) =>
  state.document.querySelector("h1")?.textContent ?? ""
);

export const has_title = always(() => title.current.trim() !== "");

Or re-export the default properties:

export * from "@antithesishq/bombadil/browser/defaults";

Documentation

See the Bombadil repository for full usage instructions and more examples.

版本与发布记录

@antithesishq/bombadil 共发布 28 个版本,首次发布于 2026/02/10;过去 12 个月发布了 28 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.7.10latest2026/10/2115 天前
0.7.92026/10/1621 天前
0.7.82026/10/011 个月前
0.7.72026/09/221 个月前
0.7.62026/09/181 个月前
0.7.52026/09/131 个月前

关于 @antithesishq/bombadil 的常见问题

@antithesishq/bombadil 是什么?

Property-based testing tool for web UIs

如何安装 @antithesishq/bombadil?

在项目目录运行 npm install @antithesishq/bombadil,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bombadil,可以用 npx bombadil 直接运行。

@antithesishq/bombadil 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@antithesishq/bombadil 可以商用吗?

@antithesishq/bombadil 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@antithesishq/bombadil 的下载量有多少?

根据 npm 官方下载统计,@antithesishq/bombadil 在 2026/10/06 – 2026/11/04 这 30 天内被下载 316,187 次,日均约 10,540 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@antithesishq/bombadil 还在维护吗?

最新版本 0.7.10 发布于 2026/10/21(15 天前);至今共发布 28 个版本,其中过去 12 个月发布了 28 个;首次发布于 2026/02/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。