package simple import ( "context" "fmt" "os" "testing" "gotest.tools/v3/assert" "edge-infra.dev/test/f2" ) var f f2.Framework func Hey(name string) string { return fmt.Sprintf("Hey %s", name) } func TestMain(m *testing.M) { f = f2.New(context.Background()) os.Exit(f.Run(m)) } func TestSimpleFeature(t *testing.T) { fin := f2.NewFeature("hello feature"). Test("test hey", func(ctx f2.Context, t *testing.T) f2.Context { assert.Equal(t, "Hey foo", Hey("foo")) return ctx }).Feature() f.Test(t, fin) }