You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Consider the following example:
funccheck(t gobdd.StepTest, ctx gobdd.Context, sumint) {
received, err:=ctx.GetInt("sumRes")
iferr!=nil {
t.Error(err)
return
}
ifsum!=received {
t.Error(errors.New("the math does not work for you"))
}
}
Because t.Error does not cause the test to fail immediately, we need to return manually from the function.
Describe the solution you'd like
By using t.Fatal the test fails immediately, making the code more concise.
Describe alternatives you've considered
One could even use testify (assert and require).
Additional context
This is true for some of the internal code of gobdd.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Consider the following example:
Because
t.Error
does not cause the test to fail immediately, we need to return manually from the function.Describe the solution you'd like
By using
t.Fatal
the test fails immediately, making the code more concise.Describe alternatives you've considered
One could even use testify (assert and require).
Additional context
This is true for some of the internal code of gobdd.
The text was updated successfully, but these errors were encountered: