Skip to content

Commit 193dd19

Browse files
committed
Add snippet to scaffold test.macros
1 parent fd1ca02 commit 193dd19

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.vscode/tests.code-snippets

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
// Place your codeql-action workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3+
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4+
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5+
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6+
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
7+
// Placeholders with the same ids are connected.
8+
// Example:
9+
// "Print to console": {
10+
// "scope": "javascript,typescript",
11+
// "prefix": "log",
12+
// "body": [
13+
// "console.log('$1');",
14+
// "$2"
15+
// ],
16+
// "description": "Log output to console"
17+
// }
18+
"Test Macro": {
19+
"scope": "javascript, typescript",
20+
"prefix": "testMacro",
21+
"body": [
22+
"const ${1:nameMacro} = test.macro({",
23+
" exec: async (t: ExecutionContext<unknown>) => {},",
24+
"",
25+
" title: (providedTitle = \"\") => `${2:common title} - \\${providedTitle}`,",
26+
"});",
27+
],
28+
"description": "An Ava test macro",
29+
},
30+
}

0 commit comments

Comments
 (0)