github.com/MontFerret/ferret@v0.18.0/pkg/stdlib/testing/fail.go (about) 1 package testing 2 3 import ( 4 "context" 5 6 "github.com/MontFerret/ferret/pkg/runtime/core" 7 "github.com/MontFerret/ferret/pkg/stdlib/testing/base" 8 ) 9 10 // FAIL returns an error. 11 // @param {String} [message] - Message to display on error. 12 var Fail = base.Assertion{ 13 DefaultMessage: func(_ []core.Value) string { 14 return "not fail" 15 }, 16 MinArgs: 0, 17 MaxArgs: 1, 18 Fn: func(ctx context.Context, args []core.Value) (bool, error) { 19 return false, nil 20 }, 21 }