Created
September 15, 2020 04:00
-
-
Save unmultimedio/2ca9fc1263e0afbb50106db6e63ab4ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Table test cases": { | |
"prefix": "ttc", | |
"body": [ | |
"t.Parallel()", | |
"type testCase struct {", | |
" name string", | |
"}", | |
"testCases := []testCase{", | |
" {", | |
" name: \"When some case\",", | |
" },", | |
"}", | |
"for _, tc := range testCases {", | |
" func(tc testCase) {", | |
" t.Run(tc.name, func(t *testing.T) {", | |
" t.Parallel()", | |
" })", | |
" }(tc)", | |
"}" | |
], | |
"description": "Table test cases" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment