Skip to content

Commit ff11cfa

Browse files
authored
docs: updated README for a better communication of the contents (#76)
Signed-off-by: Frédéric BIDON <fredbi@yahoo.com>
1 parent d83a438 commit ff11cfa

File tree

3 files changed

+44
-9
lines changed

3 files changed

+44
-9
lines changed

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,25 @@ This is the go-openapi fork of the great [testify](https://github.com/stretchr/t
2121
> [!NOTE]
2222
> This is the home of `github.com/go-openapi/testify/v2`, an active, opinionated fork of `github.com/stretchr/testify`.
2323
24-
Main features:
25-
26-
* zero external dependencies
27-
* opt-in dependencies for extra features (e.g. asserting YAML, colorized output)
28-
* assertions using generic types (see [a basic example][example-with-generics-url]). [Read the fully story with generics][doc-generics]
29-
* [searchable documentation][doc-url]
24+
## Why choose `go-openapi/testify/v2`
25+
26+
* 95% compatible with `stretchr/testify` — if you already use it, our migration tool automates the switch
27+
* Actively maintained: regular fixes and evolutions, many PRs proposed upstream are already in
28+
* Zero external dependencies — you import what you need, with opt-in modules for extras (e.g. YAML, colorized output)
29+
* Modernized codebase targeting go1.24+
30+
* Go routine leak detection built in: zero-setup, no false positives, works with parallel tests (unlike `go.uber.org/goleak`)
31+
* File descriptor leak detection (linux-only)
32+
* Type-safe assertions with generics (see [a basic example][example-with-generics-url]) — migration to generics can be automated too. [Read the full story][doc-generics]
33+
* Safe async assertions, extended JSON & YAML assertions
34+
* Coming in `v2.5.0`: non-flaky async assertions using `synctest`, and internal tools exposed as standalone modules (spew, unified diff, goleak)
35+
* We take documentation seriously: [searchable doc site][doc-url] with testable examples and a complete tutorial, plus detailed [godoc][godoc-url] for every assertion
36+
37+
### This fork isn't for everyone
38+
39+
* You need the `mock` package — we removed it and won't bring it back. For suites, we're [open to discussion][suite-discussion] about a redesigned approach
40+
* Your project must support Go versions older than 1.24
41+
* You rely on `testifylint` or other tooling that expects the `stretchr/testify` import path
42+
* You need 100% API compatibility — we're at 95%, and the remaining 5% are intentional removals
3043

3144
## Announcements
3245

@@ -174,6 +187,7 @@ Maintainers can cut a new release by either:
174187

175188
<!-- Doc links -->
176189
[doc-roadmap]: https://go-openapi.github.io/testify/project/maintainers/roadmap
190+
[suite-discussion]: https://github.com/go-openapi/testify/discussions/75
177191
<!-- Badges: status -->
178192
[test-badge]: https://github.com/go-openapi/testify/actions/workflows/go-test.yml/badge.svg
179193
[test-url]: https://github.com/go-openapi/testify/actions/workflows/go-test.yml

docs/doc-site/project/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: README
33
description: |
44
Introducing go-openapi/testify/v2.
55
6+
- Why choose testify/v2
67
- Approach
78
- Main features
89
- Differences with v1
@@ -11,6 +12,26 @@ weight: 2
1112

1213
**The v2 our tests wanted**
1314

15+
## Why choose `go-openapi/testify/v2`
16+
17+
* 95% compatible with `stretchr/testify` — if you already use it, our migration tool automates the switch
18+
* Actively maintained: regular fixes and evolutions, many PRs proposed upstream are already in
19+
* Zero external dependencies — you import what you need, with opt-in modules for extras (e.g. YAML, colorized output)
20+
* Modernized codebase targeting go1.24+
21+
* Go routine leak detection built in: zero-setup, no false positives, works with parallel tests (unlike `go.uber.org/goleak`)
22+
* File descriptor leak detection (linux-only)
23+
* Type-safe assertions with generics (see [a basic example](../usage/EXAMPLES.md)) — migration to generics can be automated too. [Read the full story](../usage/GENERICS.md)
24+
* Safe async assertions, extended JSON & YAML assertions
25+
* Coming in `v2.5.0`: non-flaky async assertions using `synctest`, and internal tools exposed as standalone modules (spew, unified diff, goleak)
26+
* We take documentation seriously: [searchable doc site](../../api/) with testable examples and a complete tutorial, plus detailed [godoc][godoc-url] for every assertion
27+
28+
### This fork isn't for everyone
29+
30+
* You need the `mock` package — we removed it and won't bring it back. For suites, we're [open to discussion](https://github.com/go-openapi/testify/discussions/75) about a redesigned approach
31+
* Your project must support Go versions older than 1.24
32+
* You rely on `testifylint` or other tooling that expects the `stretchr/testify` import path
33+
* You need 100% API compatibility — we're at 95%, and the remaining 5% are intentional removals
34+
1435
## Motivation
1536

1637
See [why we wanted a v2](./MOTIVATION.md).

docs/doc-site/project/contributing/STYLE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ Here are the reasons why they are disabled (update: Feb. 2026, `golangci-lint v2
7474

7575
```yaml
7676
disable:
77-
- depguard # we don't want to configure rules to constrain import. That's the reviewer's job
77+
- depguard # we don't want to configure rules to constrain imports. That's the reviewer's job
7878
- exhaustruct # we don't want to configure regexp's to check type name. That's the reviewer's job
79-
- funlen # we accept cognitive complexity as a meaningful metric, but function length is relevant
79+
- funlen # we accept cognitive complexity as a meaningful metric, but function length is not relevant
8080
- godox # we don't see any value in forbidding TODO's etc in code
8181
- nlreturn # we usually apply this "blank line" rule to make code less compact. We just don't want to enforce it
82-
- nonamedreturns # we don't see any valid reason why we couldn't used named returns
82+
- nonamedreturns # we don't see any valid reason why we couldn't use named returns
8383
- noinlineerr # there is no value added forbidding inlined err
8484
- paralleltest # we like parallel tests. We just don't want them to be enforced everywhere
8585
- recvcheck # we like the idea of having pointer and non-pointer receivers

0 commit comments

Comments
 (0)