README
The v2 our tests wanted
Motivation
See why we wanted a v2.
Approach with this fork
This fork targets go1.24.
- zero external dependencies by default
- extra features (and dependencies) are opt-in
- modernized code base
- simplified maintenance
- can add or remove assertions with ease
- mitigated API bloat with comprehensive domain-indexed documentation
- can leverage generics without backward compatibility concerns
The approach will be selective and pragmatic rather than comprehensive:
- Targeted improvements where generics provide clear value without compromising existing functionality
- Focus on eliminating anti-patterns like dummy value instantiation in
IsType(see #1805) - Preserve reflection-based flexibility for comparing complex types rather than forcing everything through generic constraints
- Careful constraint design to ensure type safety without being overly restrictive or permissive
The goal is to enhance type safety and developer experience where it matters most, while maintaining the flexibility that makes testify useful for real-world testing scenarios.
Breaking changes from v1
YAMLEqpanics by default: must enable the feature with an additional blank import- deprecated types and methods have been removed
- removed the
suite,mocksandhttppackages - replaced internal utility package
_codegenbycodegen
See all changes from v1 and check out our ROADMAP.
API Stability Guarantee
The assertions currently used by go-openapi projects constitute our stable API. These entry points will remain backward compatible. Other assertions may evolve as we refine the v2 API.
See Also
Getting Started:
- Examples - Practical code examples for using testify v2
- Usage Guide - API conventions and navigation guide
- Migration Guide - Migrating from stretchr/testify v1
Project Documentation:
- Changes from v1 - Complete list of changes and new features
- Roadmap - Future development plans
- Architecture - Technical architecture and design decisions
- Contributing - How to contribute to this project
- The original README