Initial commit

This commit is contained in:
fabio
2026-06-08 13:50:09 +02:00
parent 591a6181cf
commit 2608ce6e60
8 changed files with 245 additions and 107 deletions

22
hello/hello_test.go Normal file
View File

@@ -0,0 +1,22 @@
package hello
import (
"context"
"strings"
"testing"
)
// Run tests using `encore test`, which compiles the Encore app and then runs `go test`.
// It supports all the same flags that the `go test` command does.
// You automatically get tracing for tests in the local dev dash: http://localhost:9400
// Learn more: https://encore.dev/docs/go/develop/testing
func TestWorld(t *testing.T) {
const in = "Jane Doe"
resp, err := World(context.Background(), in)
if err != nil {
t.Fatal(err)
}
if got := resp.Message; !strings.Contains(got, in) {
t.Errorf("World(%q) = %q, expected to contain %q", in, got, in)
}
}