https://github.com/longbridge/assert
Extends stretchr/testify/assert for add more useful methods.
https://github.com/longbridge/assert
assert assertion assertions testing
Last synced: 4 months ago
JSON representation
Extends stretchr/testify/assert for add more useful methods.
- Host: GitHub
- URL: https://github.com/longbridge/assert
- Owner: longbridge
- License: mit
- Created: 2021-06-04T06:44:54.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-10T03:53:20.000Z (over 1 year ago)
- Last Synced: 2025-05-05T22:48:03.100Z (about 1 year ago)
- Topics: assert, assertion, assertions, testing
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Assert
[](https://github.com/longbridge/assert/actions/workflows/go.yml)
> 🍯 Requirement Go 1.18+ for Generics, lower Go version please use 0.x
Extends [stretchr/testify/assert](https://github.com/stretchr/testify/tree/master/assert) for add more useful methods.
- `assert.Equal` - asserts values equal, but ignore type.
- `assert.EqualHTML` - asserts HTML equal, ignore spaces.
## Installation
```bash
go get github.com/longbridge/assert
```
## Usage
```go
package some_test
import (
"github.com/longbridge/assert"
)
func TestSomeMethod(t *testing.T) {
assert.EqualHTML(t, "
Hello world
This is next line
", `
Hello world
This is next line
`)
}
```
## License
MIT