🍯 Requirement Go 1.18+ for Generics, lower Go version please use 0.x
Extends stretchr/testify/assert for add more useful methods.
assert.Equal
- asserts values equal, but ignore type.assert.EqualHTML
- asserts HTML equal, ignore spaces.
go get github.com/longbridgeapp/assert
package some_test
import (
"github.com/longbridgeapp/assert"
)
func TestSomeMethod(t *testing.T) {
assert.EqualHTML(t, "<p>Hello world</p><p>This is next line</p>", `
<p>Hello world</p>
<p>This is next line</p>
`)
}
MIT