@antithesishq/bombadil
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.