Closed liuzhen21 closed 2 years ago
It's better to add some sample code
@uptutu @guoj-a
testify:
assert.Equal(t, 123, 123, "they should be equal")
assert.NotEqual(t, 123, 456, "they should not be equal")
goconvey:
assert.So(expr, should.NotBeNil)
assert.So(err, should.BeNil)
testify:
assert.Equal(t, 123, 123, "they should be equal") assert.NotEqual(t, 123, 456, "they should not be equal")
goconvey:
assert.So(expr, should.NotBeNil) assert.So(err, should.BeNil)
Here are the major differences between the two.
testify
is a more traditional testing framework, with 'assertions' that are common to other programming languages
goconvey
is a BDD (Behavior-driven development) testing framework.
The same BDD framework is also available: ginkgo
Most libraries use testify
and that's what I think.
reference: vs