mirror of https://github.com/stretchr/testify.git
commit
5484d2a8ac
14
README.md
14
README.md
|
@ -32,6 +32,13 @@ The `assert` package provides some helpful methods that allow you to write bette
|
|||
See it in action:
|
||||
|
||||
```go
|
||||
package yours
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSomething(t *testing.T) {
|
||||
|
||||
// assert equality
|
||||
|
@ -61,6 +68,13 @@ func TestSomething(t *testing.T) {
|
|||
if you assert many times, use the below:
|
||||
|
||||
```go
|
||||
package yours
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSomething(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
|
|
Loading…
Reference in New Issue