testify icon indicating copy to clipboard operation
testify copied to clipboard

A toolkit with common assertions and mocks that plays nicely with the standard library

Results 469 testify issues
Sort by recently updated
recently updated
newest added

We @symflower have been using a slightly modified version of testify for years. We'd like to upstream several changes that we have found very useful for everyday testing. This is...

enhancement
pkg-assert

Hi all! I have a code. ` func xxx (x int) { if (x != 1) { log.Fatalf("Fatal msg") } } ` Now I can't catch it, it'd be great...

enhancement

Like #965, I bumped into a need to safely access (mock.Mock).Calls today, but I wanted the calls rather than the length. I think either a method to **copy** the `Calls`...

## Summary Allows for the assertion of partial expected JSON against the actual. ## Changes - Added function `JSONPartialEqf` to assert that the expected JSON construct exists within the actual...

Hello, dear developers. I hope you are well-doing. I'm using Testify in my project with `SetupSuite()` and `TeardownSuite()` functions and it works well. I'm really enjoy your product. Could you...

## Summary when using `EqualValues` for 2 objects which are of the same type and implement an `(T) Equal(T) bool` method, use the method to compare. Tbh I'd almost put...

enhancement
Breaking Change
pkg-assert

I have the following setup: ``` mockHandler. On("Apply", mock.AnythingOfType("*v1.ReplicaSet"), mock.AnythingOfType("*v1.Secret"), mock.Anything). Return(nil). mockHandler. On("Cleanup", mock.AnythingOfType("*v1.Secret"), mock.Anything). Return(nil) ``` After exercising my code, I want to assert that `Cleanup` was called:...

help wanted
pkg-mock

**What** Currently retrieving the calls via `mock.Calls` results in a data race condition when the test is using multiple go routines. **Expected** A thread-safe way to obtain the call count/list....

I try to test some properties of zap log and I got this: ``` assert.Same(t, zapcore.ISO8601TimeEncoder, got.EncoderConfig.EncodeTime) Error: Not same: expected: 0x6bb840 (func(time.Time, zapcore.PrimitiveArrayEncoder))(0x6bb840) actual : 0x6bb840 (zapcore.TimeEncoder)(0x6bb840) ``` In...