github.com/kenshin579/tutorials-go/go-echo-server@v0.0.0-20230308085259-a57c47a93bb4/cmd/bootstrap/app_test.go (about) 1 package bootstrap 2 3 import ( 4 "os" 5 "path" 6 "runtime" 7 "testing" 8 9 "github.com/stretchr/testify/assert" 10 ) 11 12 func init() { 13 _, filename, _, _ := runtime.Caller(0) 14 dir := path.Join(path.Dir(filename), "../..") 15 err := os.Chdir(dir) 16 if err != nil { 17 panic(err) 18 } 19 } 20 21 func Test_NewApp(t *testing.T) { 22 app := NewApp() 23 assert.NoError(t, app.Err()) 24 }