Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/longbridgeapp/assert
Extends stretchr/testify/assert for add more useful methods.
https://github.com/longbridgeapp/assert
assert assertion assertions testing
Last synced: about 2 months ago
JSON representation
Extends stretchr/testify/assert for add more useful methods.
- Host: GitHub
- URL: https://github.com/longbridgeapp/assert
- Owner: longbridgeapp
- License: mit
- Created: 2021-06-04T06:44:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-24T13:30:14.000Z (over 2 years ago)
- Last Synced: 2024-06-21T21:04:46.317Z (7 months ago)
- Topics: assert, assertion, assertions, testing
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Assert
[![Go](https://github.com/longbridgeapp/assert/actions/workflows/go.yml/badge.svg)](https://github.com/longbridgeapp/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/longbridgeapp/assert
```## Usage
```go
package some_testimport (
"github.com/longbridgeapp/assert"
)func TestSomeMethod(t *testing.T) {
assert.EqualHTML(t, "Hello world
This is next line
", `
Hello world
This is next line
`)
}
```## License
MIT