-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathapi.json
More file actions
290 lines (290 loc) · 16.6 KB
/
api.json
File metadata and controls
290 lines (290 loc) · 16.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
{
"id": "qwik-testing",
"package": "@qwik.dev/qwik/testing",
"members": [
{
"name": "child",
"id": "elementfixture-child",
"hierarchy": [
{
"name": "ElementFixture",
"id": "elementfixture-child"
},
{
"name": "child",
"id": "elementfixture-child"
}
],
"kind": "Property",
"content": "```typescript\nchild: HTMLElement;\n```",
"mdFile": "core.elementfixture.child.md"
},
{
"name": "createDocument",
"id": "createdocument",
"hierarchy": [
{
"name": "createDocument",
"id": "createdocument"
}
],
"kind": "Function",
"content": "Create emulated `Document` for server environment. Does not implement the full browser `document` and `window` API. This api may be removed in the future.\n\n\n```typescript\nexport declare function createDocument(opts?: MockDocumentOptions): Document;\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\nopts\n\n\n</td><td>\n\nMockDocumentOptions\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\nDocument",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/document.ts",
"mdFile": "core.createdocument.md"
},
{
"name": "createDOM",
"id": "createdom",
"hierarchy": [
{
"name": "createDOM",
"id": "createdom"
}
],
"kind": "Function",
"content": "CreatePlatform and CreateDocument\n\n\n```typescript\ncreateDOM: (input?: {\n html?: string;\n}) => Promise<{\n render: (jsxElement: JSXOutput) => Promise<import(\"@qwik.dev/core\").RenderResult>;\n screen: HTMLElement;\n userEvent: (queryOrElement: string | Element | keyof HTMLElementTagNameMap | null, eventNameCamel: string | keyof WindowEventMap, eventPayload?: any) => Promise<void>;\n}>\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n{ html }\n\n\n</td><td>\n\n(not declared)\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n<tr><td>\n\ninput\n\n\n</td><td>\n\n{ html?: string; }\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\nPromise<{ render: (jsxElement: JSXOutput) => Promise<import(\"@qwik.dev/core\").RenderResult>; screen: HTMLElement; userEvent: (queryOrElement: string \\| Element \\| keyof HTMLElementTagNameMap \\| null, eventNameCamel: string \\| keyof WindowEventMap, eventPayload?: any) => Promise<void>; }>",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/library.ts",
"mdFile": "core.createdom.md"
},
{
"name": "document",
"id": "elementfixture-document",
"hierarchy": [
{
"name": "ElementFixture",
"id": "elementfixture-document"
},
{
"name": "document",
"id": "elementfixture-document"
}
],
"kind": "Property",
"content": "```typescript\ndocument: MockDocument;\n```",
"mdFile": "core.elementfixture.document.md"
},
{
"name": "domRender",
"id": "domrender",
"hierarchy": [
{
"name": "domRender",
"id": "domrender"
}
],
"kind": "Function",
"content": "```typescript\nexport declare function domRender(jsx: JSXOutput, opts?: {\n debug?: boolean;\n}): Promise<{\n document: Document;\n container: import(\"@qwik.dev/core\").ClientContainer;\n vNode: _VNode | null;\n getStyles: () => Record<string, string | string[]>;\n}>;\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\njsx\n\n\n</td><td>\n\nJSXOutput\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\nopts\n\n\n</td><td>\n\n{ debug?: boolean; }\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\nPromise<{ document: Document; container: import(\"@qwik.dev/core\").ClientContainer; vNode: \\_VNode \\| null; getStyles: () => Record<string, string \\| string\\[\\]>; }>",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/rendering.unit-util.tsx",
"mdFile": "core.domrender.md"
},
{
"name": "ElementFixture",
"id": "elementfixture",
"hierarchy": [
{
"name": "ElementFixture",
"id": "elementfixture"
}
],
"kind": "Class",
"content": "Creates a simple DOM structure for testing components.\n\nBy default `EntityFixture` creates:\n\n```html\n<host q:view=\"./component_fixture.noop\">\n <child></child>\n</host>\n```\n\n\n```typescript\nexport declare class ElementFixture \n```\n\n\n<table><thead><tr><th>\n\nConstructor\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n(constructor)(options)\n\n\n</td><td>\n\n\n</td><td>\n\nConstructs a new instance of the `ElementFixture` class\n\n\n</td></tr>\n</tbody></table>\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[child](#elementfixture-child)\n\n\n</td><td>\n\n\n</td><td>\n\nHTMLElement\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\n[document](#elementfixture-document)\n\n\n</td><td>\n\n\n</td><td>\n\nMockDocument\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\n[host](#elementfixture-host)\n\n\n</td><td>\n\n\n</td><td>\n\nHTMLElement\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\n[parent](#elementfixture-parent)\n\n\n</td><td>\n\n\n</td><td>\n\nHTMLElement\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\n[superParent](#elementfixture-superparent)\n\n\n</td><td>\n\n\n</td><td>\n\nHTMLElement\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\n[window](#elementfixture-window)\n\n\n</td><td>\n\n\n</td><td>\n\nMockWindow\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/element-fixture.ts",
"mdFile": "core.elementfixture.md"
},
{
"name": "emulateExecutionOfQwikFuncs",
"id": "emulateexecutionofqwikfuncs",
"hierarchy": [
{
"name": "emulateExecutionOfQwikFuncs",
"id": "emulateexecutionofqwikfuncs"
}
],
"kind": "Function",
"content": "```typescript\nexport declare function emulateExecutionOfQwikFuncs(document: Document): void;\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\ndocument\n\n\n</td><td>\n\nDocument\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\nvoid",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/rendering.unit-util.tsx",
"mdFile": "core.emulateexecutionofqwikfuncs.md"
},
{
"name": "expectDOM",
"id": "expectdom",
"hierarchy": [
{
"name": "expectDOM",
"id": "expectdom"
}
],
"kind": "Function",
"content": "```typescript\nexport declare function expectDOM(actual: Element, expected: string): Promise<void>;\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\nactual\n\n\n</td><td>\n\nElement\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\nexpected\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\nPromise<void>",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/expect-dom.tsx",
"mdFile": "core.expectdom.md"
},
{
"name": "getTestPlatform",
"id": "gettestplatform",
"hierarchy": [
{
"name": "getTestPlatform",
"id": "gettestplatform"
}
],
"kind": "Function",
"content": "```typescript\nexport declare function getTestPlatform(): TestPlatform;\n```\n**Returns:**\n\nTestPlatform",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/platform.ts",
"mdFile": "core.gettestplatform.md"
},
{
"name": "host",
"id": "elementfixture-host",
"hierarchy": [
{
"name": "ElementFixture",
"id": "elementfixture-host"
},
{
"name": "host",
"id": "elementfixture-host"
}
],
"kind": "Property",
"content": "```typescript\nhost: HTMLElement;\n```",
"mdFile": "core.elementfixture.host.md"
},
{
"name": "parent",
"id": "elementfixture-parent",
"hierarchy": [
{
"name": "ElementFixture",
"id": "elementfixture-parent"
},
{
"name": "parent",
"id": "elementfixture-parent"
}
],
"kind": "Property",
"content": "```typescript\nparent: HTMLElement;\n```",
"mdFile": "core.elementfixture.parent.md"
},
{
"name": "ssrRenderToDom",
"id": "ssrrendertodom",
"hierarchy": [
{
"name": "ssrRenderToDom",
"id": "ssrrendertodom"
}
],
"kind": "Function",
"content": "```typescript\nexport declare function ssrRenderToDom(jsx: JSXOutput, opts?: {\n debug?: boolean;\n raw?: boolean;\n qwikLoader?: boolean;\n streaming?: StreamingOptions;\n onBeforeResume?: (document: Document) => void;\n}): Promise<{\n container: _DomContainer;\n document: Document;\n vNode: _VNode | null;\n getStyles: () => Record<string, string | string[]>;\n}>;\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\njsx\n\n\n</td><td>\n\nJSXOutput\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\nopts\n\n\n</td><td>\n\n{ debug?: boolean; raw?: boolean; qwikLoader?: boolean; streaming?: [StreamingOptions](#streamingoptions)<!-- -->; onBeforeResume?: (document: Document) => void; }\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\nPromise<{ container: \\_DomContainer; document: Document; vNode: \\_VNode \\| null; getStyles: () => Record<string, string \\| string\\[\\]>; }>",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/rendering.unit-util.tsx",
"mdFile": "core.ssrrendertodom.md"
},
{
"name": "StreamingOptions",
"id": "streamingoptions",
"hierarchy": [
{
"name": "StreamingOptions",
"id": "streamingoptions"
}
],
"kind": "Interface",
"content": "```typescript\nexport interface StreamingOptions \n```\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\ninOrder?\n\n\n</td><td>\n\n\n</td><td>\n\nInOrderStreaming\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n<tr><td>\n\nsuspenseFallbackDelay?\n\n\n</td><td>\n\n\n</td><td>\n\nnumber\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n<tr><td>\n\nyieldBudget?\n\n\n</td><td>\n\n\n</td><td>\n\nnumber\n\n\n</td><td>\n\n_(Optional)_ Time budget in ms between I/O yields during SSR. Default: 10. Set to 0 to disable.\n\n\n</td></tr>\n</tbody></table>",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/server/types.ts",
"mdFile": "core.streamingoptions.md"
},
{
"name": "superParent",
"id": "elementfixture-superparent",
"hierarchy": [
{
"name": "ElementFixture",
"id": "elementfixture-superparent"
},
{
"name": "superParent",
"id": "elementfixture-superparent"
}
],
"kind": "Property",
"content": "```typescript\nsuperParent: HTMLElement;\n```",
"mdFile": "core.elementfixture.superparent.md"
},
{
"name": "trigger",
"id": "trigger",
"hierarchy": [
{
"name": "trigger",
"id": "trigger"
}
],
"kind": "Function",
"content": "Trigger an event in unit tests on an element. Needs to be kept in sync with the Qwik Loader event dispatching.\n\nEvents can be either case sensitive element-scoped events or scoped kebab-case.\n\nFuture deprecation candidate.\n\n\n```typescript\nexport declare function trigger(root: Element, queryOrElement: string | Element | keyof HTMLElementTagNameMap | null, eventName: string, eventPayload?: any, options?: {\n waitForIdle?: boolean;\n}): Promise<void>;\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\nroot\n\n\n</td><td>\n\nElement\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\nqueryOrElement\n\n\n</td><td>\n\nstring \\| Element \\| keyof HTMLElementTagNameMap \\| null\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\neventName\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\neventPayload\n\n\n</td><td>\n\nany\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n<tr><td>\n\noptions\n\n\n</td><td>\n\n{ waitForIdle?: boolean; }\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\nPromise<void>",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/element-fixture.ts",
"mdFile": "core.trigger.md"
},
{
"name": "vnode_fromJSX",
"id": "vnode_fromjsx",
"hierarchy": [
{
"name": "vnode_fromJSX",
"id": "vnode_fromjsx"
}
],
"kind": "Function",
"content": "```typescript\nexport declare function vnode_fromJSX(jsx: JSXOutput): {\n vParent: _VirtualVNode | _ElementVNode;\n vNode: _VNode | null;\n document: _QDocument;\n container: ClientContainer;\n};\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\njsx\n\n\n</td><td>\n\nJSXOutput\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\n{ vParent: \\_VirtualVNode \\| \\_ElementVNode; vNode: \\_VNode \\| null; document: \\_QDocument; container: ClientContainer; }",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/vdom-diff.unit-util.ts",
"mdFile": "core.vnode_fromjsx.md"
},
{
"name": "waitForDrain",
"id": "waitfordrain",
"hierarchy": [
{
"name": "waitForDrain",
"id": "waitfordrain"
}
],
"kind": "Function",
"content": "Wait for the scheduler to drain.\n\nThis is useful when testing async code.\n\n\n```typescript\nexport declare function waitForDrain(container: Container): Promise<void>;\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\ncontainer\n\n\n</td><td>\n\nContainer\n\n\n</td><td>\n\nThe application container.\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\nPromise<void>",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/util.ts",
"mdFile": "core.waitfordrain.md"
},
{
"name": "walkJSX",
"id": "walkjsx",
"hierarchy": [
{
"name": "walkJSX",
"id": "walkjsx"
}
],
"kind": "Function",
"content": "```typescript\nexport declare function walkJSX(jsx: JSXOutput, apply: {\n enter: (jsx: JSXNodeInternal) => void;\n leave: (jsx: JSXNodeInternal) => void;\n text: (text: _Stringifiable) => void;\n}): void;\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\njsx\n\n\n</td><td>\n\nJSXOutput\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\napply\n\n\n</td><td>\n\n{ enter: (jsx: JSXNodeInternal) => void; leave: (jsx: JSXNodeInternal) => void; text: (text: \\_Stringifiable) => void; }\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>\n\n**Returns:**\n\nvoid",
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/testing/vdom-diff.unit-util.ts",
"mdFile": "core.walkjsx.md"
},
{
"name": "window",
"id": "elementfixture-window",
"hierarchy": [
{
"name": "ElementFixture",
"id": "elementfixture-window"
},
{
"name": "window",
"id": "elementfixture-window"
}
],
"kind": "Property",
"content": "```typescript\nwindow: MockWindow;\n```",
"mdFile": "core.elementfixture.window.md"
}
]
}