Skip to content

Instantly share code, notes, and snippets.

@unmultimedio
Created September 15, 2020 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unmultimedio/2ca9fc1263e0afbb50106db6e63ab4ed to your computer and use it in GitHub Desktop.
Save unmultimedio/2ca9fc1263e0afbb50106db6e63ab4ed to your computer and use it in GitHub Desktop.
{
"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