Skip to content

require.NoError does not work for given example #762

Open
@MaerF0x0

Description

viewing https://godoc.org/github.com/stretchr/testify/require#NoError

gives the example

actualObj, err := SomeFunction()
  if assert.NoError(err) {
	   assert.Equal(t, expectedObj, actualObj)
  }

but require.NoError does not return a value . (also the example shows assert, though it should be about require)

IMO require.NoError should return a bool to match assert.NoError

let me know if you want a PR to fix.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions