This commit is contained in:
Slayder12
2025-12-02 14:32:08 +03:00
commit 8e36cee8af
5 changed files with 87 additions and 0 deletions

26
testfunc_test.go Normal file
View File

@@ -0,0 +1,26 @@
package main
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestHello(t *testing.T) {
tests := []struct {
name string
want string
}{
{
name: "basic test - returns correct greeting",
want: "Hello go",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := hello()
require.Equal(t, tt.want, got, "hello() should return expected string")
})
}
}