|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
snippet ignore "ignore function" !
|
|
|
|
|
func(...interface{}) {}(${1})
|
|
|
|
|
func(...any) {}(${1})
|
|
|
|
|
endsnippet
|
|
|
|
|
snippet ctx "context" !
|
|
|
|
|
ctx context.Context
|
|
|
|
@ -23,17 +23,20 @@ func Test${1}(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
endsnippet
|
|
|
|
|
snippet htest "setup hellotech test case" !
|
|
|
|
|
|
|
|
|
|
snippet htest "setup context test case" !
|
|
|
|
|
func Test${1}(t *testing.T) {
|
|
|
|
|
type testcase struct {
|
|
|
|
|
Name string
|
|
|
|
|
Setup func(tc *testcase)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tt := []testcase{}
|
|
|
|
|
|
|
|
|
|
for _, tc := range tt {
|
|
|
|
|
tc := tc
|
|
|
|
|
t.Run(tc.Name, func(t *testing.T) {
|
|
|
|
|
ctx, a, ctrl := cutils.Test(t)
|
|
|
|
|
ctx, a, ctrl := utils.Test(t)
|
|
|
|
|
t.Parallel()
|
|
|
|
|
tc.Setup(&tc)
|
|
|
|
|
})
|
|
|
|
|