Skip to content

Commit e6d65df

Browse files
committed
add code for different wrappers on query api page
1 parent 68b1ec4 commit e6d65df

File tree

3 files changed

+393
-66
lines changed

3 files changed

+393
-66
lines changed

.vscode/markdown.code-snippets

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
// Place your testing-library-docs 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+
"Multilanguage Code Block": {
19+
"scope": "markdown",
20+
"prefix": "docblock",
21+
"body": [
22+
"```html",
23+
"$4",
24+
"```",
25+
"",
26+
"<!--DOCUSAURUS_CODE_TABS-->",
27+
"",
28+
"<!--Native-->",
29+
"```js",
30+
"import { $1 } from 'dom-testing-library'",
31+
"",
32+
"const container = document.body",
33+
"const $3 = $1(container, '$2')",
34+
"```",
35+
"",
36+
"<!--React-->",
37+
"```js",
38+
"import { render } from 'react-testing-library'",
39+
"",
40+
"const { $1 } = render(<MyComponent />)",
41+
"const $3 = $1('$2')",
42+
"```",
43+
"",
44+
"<!--Cypress-->",
45+
"```js",
46+
"cy.$1('$2').should('exist')",
47+
"```",
48+
"",
49+
"<!--END_DOCUSAURUS_CODE_TABS-->"
50+
],
51+
"description": "Create a Docusaurus multi-language code block"
52+
}
53+
}

0 commit comments

Comments
 (0)