assert
assert copied to clipboard
A simple assertion library using Go generics
hello, consider a test comparing two strings that _do not end with a newline: ```go func TestNoNewline(t *testing.T) { want := "banana" have := "mango" assert.Equal(t, want, have) } ```...
My code: ```go assert.True(t, req.Tariff.PercentPerScheme.Other == nil, "other percent should be nil") ``` Expected output: ``` mapping_test.go:60: other percent should be nil ``` Actual output: ``` mapping_test.go:60: Expected expression to...
Hello, Is there an option to see colored diffs when a test fails? I didn't notice one when looking at the code. If not, would you accept a PR to...
Firstly, thank you for this excellent library! I'm slowly migrating my projects from stretchr/testify to alecthomas/assert. What's wrong with this code? ```go assert.Zero(t, 0, len(foo), "foo should have length zero")...
I just updated to the latest version of assert and it seems to be causing havoc on our CI/CD system. The problem is that we have several checks on large...
Given two times that are equal using their [`.Equal()`](https://pkg.go.dev/time#Time.Equal) method, they fail using `assert.Equal()`. ## Proposed solution Instead of using `reflect.DeepEqual()`, first check if we are asserting times, and then...
This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more.[View this repository on the Mend.io Web Portal](https://developer.mend.io/github/alecthomas/assert). ## Awaiting Schedule The following updates are...
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | Type | Update | |---|---|---|---|---|---| | [github.com/alecthomas/repr](https://redirect.github.com/alecthomas/repr) | `v0.4.0` -> `v0.5.2` |  | ...