1package globals_test 2 3import ( 4 "testing" 5 6 "github.com/onsi/ginkgo/extensions/globals" 7 "github.com/onsi/ginkgo/internal/global" 8) 9 10func TestGlobals(t *testing.T) { 11 global.InitializeGlobals() 12 oldSuite := global.Suite 13 if oldSuite == nil { 14 t.Error("global.Suite was nil") 15 } 16 17 globals.Reset() 18 newSuite := global.Suite 19 if newSuite == nil { 20 t.Error("new global.Suite was nil") 21 } 22 23 if oldSuite == newSuite { 24 t.Error("got the same suite but expected it to be different!") 25 } 26} 27