Text

claim

Marks a sentence of copy as a claim, with the primary source it comes from and a check that it still holds. It returns the text unchanged, so the copy reads as before; the evidence is for whoever checks it next. The checker that installs beside it, claims-check.mjs, reads it from the source code (keep the arguments literal) and runs each check: add "claims:check": "node src/lib/ouro/claims-check.mjs check" to your scripts, with your lib folder in place of src/lib, and run it in CI. It also fails on a sentence of your Markdown or copy that states a fact without a source.

import { claim } from "@/lib/ouro/claims";

Example

const tagline = claim("Checkout passes axe in every theme.", {
  source: { test: "src/checkout.test.tsx::checkout passes axe" },
  verify: { testExists: "src/checkout.test.tsx::checkout passes axe" },
});

Use instead when

  • Use a plain string instead when the sentence states no fact a reader could check: an instruction, a label, a question.

Parameters

text
Type: Text
evidence
Type: ClaimEvidence

Returns

Text