Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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_test

import (
"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