package scopes_test import ( "fmt" tbase "testing" "git.sr.ht/~cco/go-scopes/app" "git.sr.ht/~cco/go-scopes/testing" "git.sr.ht/~cco/go-scopes/tests/etc" ) func TestConfig(tb *tbase.T) { t := testing.SetUpApp(tb, etc.Config()) t.Run("testing", TestingTest) t.Run("config", ConfigTest) t.TearDownApp() } func TestingTest(t *testing.T) { ctx := t.Ctx fmt.Println(ctx.Services()) } func ConfigTest(t *testing.T) { cfg := etc.Config() t.AssertEqual(cfg.Name(), "testing") appCfg := cfg.(*app.Cfg) t.AssertEqual(appCfg.Home, "tests") confCtx := t.Ctx.Services()["config"] t.AssertEqual(confCtx.Config().Name(), "config") }