Conversation
There was a problem hiding this comment.
Pull request overview
Prepares the v2.4.0 release by extending async condition assertions (adding Consistently and allowing func(context.Context) error conditions for Eventually/Consistently), removing the redundant Comparison alias type, and updating docs/tooling to match.
Changes:
- Add
Conditioner/CollectibleConditionertype constraints and introduceConsistently(+ formatted variants) acrossinternal/assertions,assert, andrequire. - Refactor async polling to support context/error-based condition functions and update/expand tests and examples accordingly.
- Replace the local Hugo bash helper with a Go “script” and refresh documentation, tracking, and lint/spellcheck assets.
Reviewed changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
require/require_types.go |
Exposes new condition type constraints from internal/assertions in require. |
require/require_forward_test.go |
Removes forward-method tests for async assertions to reflect API surface changes. |
require/require_forward.go |
Updates Condition signatures and removes Eventually* forward methods; renames waitFor → timeout for Never*. |
require/require_format_test.go |
Adds coverage for Consistentlyf (require, formatted). |
require/require_format.go |
Adds Consistentlyf and updates Eventuallyf/EventuallyWithf to use generic condition constraints. |
require/require_examples_test.go |
Adds ExampleConsistently usage example. |
require/require_assertions_test.go |
Adds Consistently tests (require). |
require/require_assertions.go |
Adds Consistently and upgrades Eventually/EventuallyWith to accept constrained condition signatures. |
require/require_adhoc_example_8_test.go |
Adds additional runnable examples for async assertions (bool + context/error variants). |
internal/testintegration/README.md |
Improves markdown formatting for dependency list. |
internal/spew/spew_test.go |
Adds gosec suppression comment for a known-safe ReadFile in tests. |
internal/spew/common_test.go |
Fixes typo and simplifies string building in test helper. |
internal/spew/README.md |
Improves formatting / link rendering for upstream references. |
internal/assertions/ifaces.go |
Removes Comparison type from internal interfaces. |
internal/assertions/http_test.go |
Adds gosec suppression comment for test handler output. |
internal/assertions/generics.go |
Introduces Conditioner and CollectibleConditioner constraints (includes context/error variants). |
internal/assertions/format.go |
Adds gosec suppression comment for formatting output. |
internal/assertions/error.go |
Avoids Sprintf allocations by switching to Fprintf on a builder. |
internal/assertions/enable/yaml/enable_yaml.go |
Fixes spelling in comments (“external”). |
internal/assertions/condition_test.go |
Adds tests for context/error conditions, introduces shared test cases for Never/Consistently, and expands coverage. |
internal/assertions/condition.go |
Adds Consistently, generalizes condition polling to context/error functions, and adapts EventuallyWith to context-capable conditions. |
hack/doc-site/hugo/testify.yaml |
Removes generated config from the repo (now generated locally). |
hack/doc-site/hugo/gendoc.sh |
Removes bash-based local Hugo helper script. |
hack/doc-site/hugo/gendoc.go |
Adds Go-based local Hugo helper to generate config and run the server. |
hack/doc-site/hugo/README.md |
Updates local doc-site instructions to use go run gendoc.go. |
hack/doc-site/hugo/.gitignore |
Ignores generated testify.yaml. |
docs/doc-site/usage/TRACKING.md |
Marks Consistently as adapted and updates tracking counts/refs. |
docs/doc-site/usage/MIGRATION.md |
Updates migration doc references (but needs count consistency). |
docs/doc-site/usage/CHANGES.md |
Documents new async function(s), behavior changes, and breaking changes for v2.4.0. |
docs/doc-site/project/maintainers/ROADMAP.md |
Updates roadmap text and processed-item counts to reflect current status. |
docs/doc-site/api/condition.md |
Updates condition domain docs for new generics + Consistently, and revises signatures/semantics. |
docs/doc-site/api/_index.md |
Updates condition domain count from 4 → 5. |
docs/doc-site/_index.md |
Updates site index references (but needs count consistency). |
docs/LINTING.md |
Minor doc wording/format updates (“nolint”, “test data”). |
assert/assert_types.go |
Exposes new condition type constraints from internal/assertions in assert. |
assert/assert_forward_test.go |
Removes forward-method tests for async assertions to reflect API surface changes. |
assert/assert_forward.go |
Updates Condition signatures and removes Eventually* forward methods; renames waitFor → timeout for Never*. |
assert/assert_format_test.go |
Adds coverage for Consistentlyf (assert, formatted). |
assert/assert_format.go |
Adds Consistentlyf and updates Eventuallyf/EventuallyWithf to use generic condition constraints. |
assert/assert_examples_test.go |
Adds ExampleConsistently usage example. |
assert/assert_assertions_test.go |
Adds Consistently tests (assert). |
assert/assert_assertions.go |
Adds Consistently and upgrades Eventually/EventuallyWith to accept constrained condition signatures. |
assert/assert_adhoc_example_8_test.go |
Adds additional runnable examples for async assertions (bool + context/error variants). |
README.md |
Updates badge label wording (“CI vulnerability scan”). |
CODE_OF_CONDUCT.md |
Formats contact email as a mailto-style link target (<...>). |
.github/wordlist.txt |
Expands project wordlist for spellchecking. |
.claude/CLAUDE.md |
Updates repo automation/docs references (counts + Hugo helper usage). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
311ec80 to
74776d3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #64 +/- ##
==========================================
- Coverage 91.34% 91.32% -0.03%
==========================================
Files 91 91
Lines 11889 11925 +36
==========================================
+ Hits 10860 10890 +30
- Misses 817 822 +5
- Partials 212 213 +1 ☔ View full report in Codecov by Sentry. |
* feat(condition): added support for Consistently * feat(condition): added support for func(context.Context) error to async assertions Eventually and Consistently > NOTE: refrained from adding func(ctx) error to Never, > as it introduces a confusing logic which is awkward to document and prone to errors. **BREAKING**: removed Condition type - no value added to alias func() bool > Part of our plan to clean up unnecessary extra types chore: removed bash script for local testing with hugo (now a go "script") > Part of our plan to superseded all local bash by go scripts. > Bash has a place and it's in CI only. doc: added testable examples for async assertions (Eventually, etc) doc: fixup typos, introduced wordlist for future spellcheckers (currently experimented locally only) doc: updated changes & upstream tracking references Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
74776d3 to
7f19b12
Compare
BREAKING: removed Condition type - no value added to alias func() bool
chore: removed bash script for local testing with hugo (now a go "script")
doc: added testable examples for async assertions (Eventually, etc) doc: fixup typos, introduced wordlist for future spellcheckers (currently experimented locally only)
doc: updated changes & upstream tracking references
Change type
Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update
Short description
Fixes
Full description
Checklist