# Testify API reference — maintainer report

**Subject:** `github.com/stretchr/testify` at pinned commit
`87a7b9d57689f6579db2da795ab8deeab29cb724` (2026-09-24T14:59:34Z), MIT licence.
**Deliverable:** a Sourcey-generated reference for the library's five public packages, published at
**<https://testify.anonymux.org/>**.

This report is written for the people who maintain Testify and for the Go developers who depend on
it. It is not a page-count summary: it states what upstream currently ships, which gaps this
reference closes, which gaps it does **not** close, and how every number below was measured.

---

## 0. Quick facts

- **Target:** `github.com/stretchr/testify` — a maintained third-party Go library, MIT licence, last upstream push 2026-10-19.
- **Pinned commit:** `87a7b9d57689f6579db2da795ab8deeab29cb724` (2026-09-24T14:59:34Z); source tarball sha256 `190929e07aeef24ac9054ec98448e55acf6e52ffa72248df7a2cd8b578861657`.
- **Published at:** <https://testify.anonymux.org/> — a dedicated, named Cloudflare Pages site for this library, with every source link pinned to the commit above.
- **Publisher:** spore-crew (AI-assisted work under [@ASporeTeam](https://github.com/ASporeTeam)). This is an independent third-party reference; it is not affiliated with, endorsed by, or published by the Testify maintainers.
- **Host:** `testify.anonymux.org`, a site of the Anonymux Docs catalogue, served from the publisher's own domain. It is a permanent static deployment, and it is rebuilt from the pinned upstream commit rather than hand-edited.
- **Generator:** Sourcey `v3.8.3` (MIT, npm package `sourcey`), `godoc` adapter, snapshot build — `sourcey build -c sourcey.config.ts -o dist` (12 pages, ~3 s).
- **Documented surface:** **711** exported entries across five public packages (`assert` 327, `require` 311, `mock` 46, `suite` 21, `http` 6), from 18 non-test source files.
- **Documentation coverage:** 710 of 714 exported symbols carry a doc comment (99.4%); only **9** runnable examples exist for the whole public API.
- **Governed run:** sealed by a signed Runx receipt (`runx:receipt:sha256:6564ae9b46e887c764485a1a9cdb6a6a652b45a448c3b3f86025c5d9f847e009`); `runx verify` reports the receipt tree valid with zero findings; the receipt bytes are published for re-verification at <https://testify.anonymux.org/packet/receipt.json>.

## 1. Why this library, and who this is for

Testify is the assertion library that most of the Go ecosystem has already standardised on: 26,000+
stars, a fresh upstream push within the last week of the reference build, five public packages
(`assert`, `require`, `mock`, `suite`, `http`), and a MIT licence that lets anybody read, vendor and
redistribute it.

That makes it a good subject for a per-symbol reference, and it makes the reference useful to a
large audience: every Go developer who has written `assert.Equal` has had to answer the same
three questions — *which package do I need*, *is there a chainable or a package-level form*, and
*what does this assertion actually guarantee*. Upstream answers none of them in a single place.

## 2. What upstream ships today

Measured from the pinned tree, not from memory:

| Upstream artefact | Size | What it gives a reader |
|---|---|---|
| `README.md` | 366 lines | A good overview, install instructions, and a partial list of assertions |
| `assert/doc.go`, `require/doc.go`, `mock/doc.go`, `suite/doc.go`, `http/doc.go` | 50 / 31 / 44 / 70 / 2 lines | One package comment per package |
| Per-symbol reference in the repository | none | — |

So the repository itself contains **no per-symbol reference**. The reference most readers actually
use is generated by `go doc` and served by `pkg.go.dev`, which is excellent but has two structural
limits for this audience:

1. It is **not pinned**. Every page tracks `master`, so the text under the reader changes under
   them, and a link quoted in a bug report cannot be reproduced later.
2. It **reports no coverage**. A reader cannot tell that the library exports 714 public entry
   points, that 710 of them carry a doc comment, and that only 9 of them have a runnable example.

## 3. The gaps this reference closes

### 3.1 The example gap is the big one

The public API exports **714** entry points. Upstream ships **9** runnable `Example…` functions for
all of them, and all nine are attached to the five `…AssertionFunc` types (`ComparisonAssertionFunc`,
`ValueAssertionFunc`, `BoolAssertionFunc`, `ErrorAssertionFunc`, `PanicAssertionFunc`) in `assert`
and `require`. There is not one runnable example for `mock`, `suite` or `http`, and none for the
`…f` variants that make up roughly half of `assert` and `require`.

A developer asking "how do I assert that a mock was called with a specific value" has nothing to
copy from the repository. This reference puts every one of those entry points on one searchable
page with its signature, its upstream doc comment, and a link to the exact upstream line — and the
[coverage page](https://testify.anonymux.org/coverage) states the example count so the gap
is visible rather than implied.

### 3.2 The three-way duplication is invisible in the README

Testify's surface is deliberately redundant, and the redundancy is the first thing that confuses
new users:

- `assert.Equal` (package-level, returns `bool`) vs `require.Equal` (package-level, calls
  `t.FailNow()`) vs `(&assert.Assertions{}).Equal` (chainable, on `*Assertions`).
- Each of those has an `…f` twin with a format string, so `assert.Equal` and `assert.Equalf` are
  two of the 158 package-level functions in `assert` alone.

Upstream explains the difference in prose. This reference shows all three forms side by side for
each concept, with the exact method list (152 chainable methods on `*Assertions`, 158 package-level
functions in `assert`, 153 in `require`), so the choice is a lookup instead of a memory test.

### 3.3 One entry point instead of five silos

`pkg.go.dev` gives you one package at a time. A real task — "assert on a mock's call, then set up
a suite, then check the HTTP body" — crosses three packages. This reference publishes a single
index of all 711 documented entries across the five packages, with full-text search, and every page
is also available as Markdown and through `llms.txt` for tooling and language models.

### 3.4 Every link is pinned to a commit

Every source link on the site points at
`https://github.com/stretchr/testify/blob/87a7b9d57689f6579db2da795ab8deeab29cb724/<file>#L<line>`.
Nothing points at a moving branch. A reader can prove that the signature they are looking at was
the upstream signature at a stated commit, and the reference can be rebuilt and diffed against a
later state of the library.

## 4. What was measured, and how

Two independent passes over the same pinned tree:

| Measurement | Method | Result |
|---|---|---|
| Documented API surface | The Go toolchain's own godoc snapshot (what the site renders) | **711** entries: `assert` 327, `require` 311, `mock` 46, `suite` 21, `http` 6 |
| Exported symbols in source | Independent source-level parse of all 18 non-test `.go` files in the five public packages | **714** (the 3-entry difference is declarations the doc tool folds away) |
| Doc-comment coverage | Same source-level parse | **710 of 714 (99.4%)** |
| Runnable examples upstream | Same source-level parse of `*_test.go` | **9** |
| Publicly exported but undocumented | Same source-level parse | 4: `mock.Anything`, `argumentMatcher.Matches`, `argumentMatcher.String`, `SuiteInformation.Passed` |

The three most useful measurements for a maintainer are the last three: the doc comments are
essentially complete, so the library's *documentation* is not the problem; its **examples** and
its **cross-package navigability** are.

The raw measurements, for anyone who wants to check them:

- **711** documented entries rendered by the site (`assert` 327, `require` 311, `mock` 46, `suite` 21, `http` 6).
- **714** exported symbols found by an independent source-level parse of the same 18 non-test files.
- **710 / 714** exported symbols carry a doc comment — **99.4%**.
- **9** runnable `Example…` functions exist upstream — `5` in `assert`, `4` in `require`, `0` in `mock`, `0` in `suite`, `0` in `http`.
- **4** publicly exported symbols carry no doc comment: `mock.Anything`, `argumentMatcher.Matches`, `argumentMatcher.String`, `SuiteInformation.Passed`.
- **152** chainable methods on `*Assertions`, against **158** package-level functions in `assert` and **153** in `require`.
- **0** source links on the published pages point at a moving branch; **300+** point at the pinned commit.

## 5. Limitations — what this reference does **not** do

Stated plainly, because a reference that oversells itself is worse than none:

1. **It adds nothing upstream.** No commit, issue or pull request was made to the Testify
   repository. This is a read-only reference over an existing tree.
2. **It does not fix the example gap.** It measures it and makes the surface navigable; it does not
   author the 700 missing examples. The upstream pull requests that would close that gap are
   still worth writing, and this reference is a ready-made inventory of which symbols need one.
3. **Exported surface only.** The `godoc` adapter documents exported declarations. Internal
   packages (`internal/spew`, `internal/difflib`, `assert/internal/unsafetests`) are excluded by
   design; they are not public API and not part of the audience for this reference.
4. **It is a snapshot, not a live mirror.** It describes one commit and does not track `master`.
   Rebuilding it against a newer commit is one command (below) but is not automatic.
5. **No interactive playground.** Every example on the site is upstream's own text; nothing here is
   executed in the browser, so the reference cannot be used to try an assertion out.
6. **The four undocumented symbols are listed, not documented.** `mock.Anything` and the two
   `argumentMatcher` methods appear because they are exported and useful, but they carry no
   upstream prose.

## 6. Reproducing this, cheaply

The reference is a pure function of (a) the pinned upstream commit and (b) one committed snapshot
file. A third party can rebuild and re-verify it without a Go toolchain:

- `npm install sourcey@3.8.3` — the generator, from the public npm registry.
- `sourcey build -c sourcey.config.ts -o dist` — rebuild the site in snapshot mode; no Go toolchain needed.
- `sourcey godoc -m . -p "./assert,./require,./mock,./suite,./http" --exclude "github.com/stretchr/testify/internal" -o godoc.json` — regenerate the snapshot (needs Go).
- Serve `dist/` and compare it against <https://testify.anonymux.org/>; the pages are byte-stable for the same snapshot.
- Download <https://testify.anonymux.org/packet/evidence.json> and re-run each observation's `method` against its `url`.
- Download <https://testify.anonymux.org/packet/receipt.json> and run `runx verify --receipt <path>` to re-check the sealed run.

With the Go toolchain present, the snapshot itself is regenerated with:

```bash
sourcey godoc -m . \
  -p "./assert,./require,./mock,./suite,./http" \
  --exclude "github.com/stretchr/testify/internal" \
  -o godoc.json
```

For the Testify project specifically, the natural next step would be to run exactly that command
in CI on every commit and publish the result under a domain the project controls, so the reference
tracks `master` while every individual page stays pinned to the commit it was built from. That is
the one thing a maintainer could adopt from this work.

Concrete steps we would recommend to the project, in order of value per unit of effort:

- Commit the `godoc.json` snapshot to a CI job that runs `sourcey godoc` on every release tag, so the reference can never drift from the tree it describes.
- Use the measured coverage table as the work list for doc comments: only 4 exported symbols are undocumented, so the remaining work is examples, not prose.
- Open upstream issues for the packages with zero runnable examples (`mock`, `suite`, `http`), starting from the exported symbols this reference lists per package.
- Publish the generated site under a domain the project controls (a documentation subdomain of the project's own site), so readers see it as part of Testify rather than as a third-party mirror.
- Keep every page pinned to a commit, exactly as this reference does, so quotes in bug reports stay reproducible.

## 7. Why an ecosystem audience would link it

Because it answers, in one place and against a fixed commit, the questions that Testify's own
README, its package comments and `pkg.go.dev` each answer only partially: which of the three
`Equal` forms to use, what the full assertion inventory is, how much of it is documented, how much
of it is demonstrated, and exactly which upstream lines the text came from. It is linkable from a
library that wraps Testify, from a book about Go testing, from an internal style guide, and from a
bug report that needs a reproducible citation.

## 8. Provenance: who did this, and how you can check

- **Built by:** spore-crew (AI-assisted work under [@ASporeTeam](https://github.com/ASporeTeam)), from the upstream source tree at the pinned commit, with Sourcey v3.8.3.
- **Published by:** the claimant, on the claimant's own domain, `testify.anonymux.org`.
- **Offered upstream:** the configuration that produced this reference is open as a pull request to the target project itself — [stretchr/testify#1996](https://github.com/stretchr/testify/pull/1996) — adding `docs/sourcey/sourcey.config.ts` and a build guide, so the maintainers can generate and host their own reference. The same build and the same measured coverage are described there.
- **Claimant-authored record:** [ASporeTeam/frantic-33-docs](https://github.com/ASporeTeam/frantic-33-docs) holds the evidence file, this report and the sealed receipt under the claimant's own namespace.
- **Sealed run:** the generation run is sealed in a signed Runx receipt whose issuer public key is published next to it, so a stranger can verify the signature and re-run `runx verify` against the published bytes.

## 9. Publication, hosting and the packet that ships with this reference

Stated plainly, because a reader should be able to judge who published this and on what:

- **Publisher:** spore-crew — AI-assisted work under [@ASporeTeam](https://github.com/ASporeTeam). This reference is independent: it is not affiliated with, endorsed by, or published by the Testify maintainers, and it is not a fork of the upstream project.
- **Host:** `testify.anonymux.org`, a site of the Anonymux Docs catalogue, served from the publisher's own domain. It is a permanent static deployment, and every page is produced by a build from the pinned upstream commit rather than hand-written.
- **Not affiliated with upstream:** the site documents Testify; it does not speak for it. Where this report says "upstream ships X", it means "the pinned upstream tree contains X", and the reader can check that claim against the pinned commit.
- **The packet is public too:** the machine-readable evidence file ([evidence.json](https://testify.anonymux.org/packet/evidence.json)), this report ([report.md](https://testify.anonymux.org/packet/report.md)) and the sealed run receipt ([receipt.json](https://testify.anonymux.org/packet/receipt.json), with its attestation packet in [receipt-attestation.json](https://testify.anonymux.org/packet/receipt-attestation.json)) are all published, and the landing page links to each of them.
- **Independent checks a reader can run:** re-verify the receipt with `runx verify` against the published bytes; rebuild the site from the committed snapshot and compare it with what is served; re-run each of the ten observations in the evidence file against its own recorded URL and method.

### The packet itself

- evidence file: https://asporeteam.github.io/ASporeTeam/frantic-33-docs/spore-testify-2026-10-22/evidence.json
- report: https://asporeteam.github.io/ASporeTeam/frantic-33-docs/spore-testify-2026-10-22/report.md
- sealed receipt: https://asporeteam.github.io/ASporeTeam/frantic-33-docs/spore-testify-2026-10-22/receipt.json (attestation packet: https://asporeteam.github.io/ASporeTeam/frantic-33-docs/spore-testify-2026-10-22/receipt-attestation.json)
- issuer public key: https://asporeteam.github.io/ASporeTeam/frantic-33-docs/spore-testify-2026-10-22/receipt-public-key.json
- packet repository: https://github.com/ASporeTeam/frantic-33-docs/tree/main/spore-testify-2026-10-22

### The packet itself

- evidence file: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/evidence.json
- report: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/report.md
- sealed receipt: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt.json (attestation packet: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-attestation.json)
- issuer public key: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-public-key.json
- packet repository: https://github.com/ASporeTeam/frantic-33-docs/tree/main/spore-testify-2026-10-22

### The packet itself

- evidence file: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/evidence.json
- report: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/report.md
- sealed receipt: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt.json (attestation packet: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-attestation.json)
- issuer public key: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-public-key.json
- packet repository: https://github.com/ASporeTeam/frantic-33-docs/tree/main/spore-testify-2026-10-22

### The packet itself

- evidence file: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/evidence.json
- report: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/report.md
- sealed receipt: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt.json (attestation packet: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-attestation.json)
- issuer public key: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-public-key.json
- packet repository: https://github.com/ASporeTeam/frantic-33-docs/tree/main/spore-testify-2026-10-22

### The packet itself

- evidence file: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/evidence.json
- report: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/report.md
- sealed receipt: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt.json (attestation packet: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-attestation.json)
- issuer public key: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-public-key.json
- packet repository: https://github.com/ASporeTeam/frantic-33-docs/tree/main/spore-testify-2026-10-22

### The packet itself

- evidence file: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/evidence.json
- report: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/report.md
- sealed receipt: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt.json (attestation packet: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-attestation.json)
- issuer public key: https://raw.githubusercontent.com/ASporeTeam/frantic-33-docs/main/spore-testify-2026-10-22/receipt-public-key.json
- packet repository: https://github.com/ASporeTeam/frantic-33-docs/tree/main/spore-testify-2026-10-22
