Files
test/testfunc_test.go
Slayder12 c589d609c5
All checks were successful
Go / test (push) Successful in 1m15s
test
2025-12-16 19:53:10 +03:00

26 lines
510 B
Go
Executable File

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")
})
}
}