Skip to content

Commit 8c13c16

Browse files
committed
Fix types
1 parent 5a92d27 commit 8c13c16

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/react-sdk/src/component-generator.test.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ test("generate jsx element with children and without them", () => {
8585
usedDataSources: new Map(),
8686
indexesWithinAncestors: new Map(),
8787
metas: new Map(),
88+
tagsOverrides: {},
8889
children: [{ type: "id", value: "body" }],
8990
...renderData(<$.Body ws:id="body">Children</$.Body>),
9091
})
@@ -103,6 +104,7 @@ test("generate jsx element with children and without them", () => {
103104
usedDataSources: new Map(),
104105
indexesWithinAncestors: new Map(),
105106
metas: new Map(),
107+
tagsOverrides: {},
106108
children: [{ type: "id", value: "image" }],
107109
...renderData(<$.Image ws:id="image"></$.Image>),
108110
})
@@ -123,6 +125,7 @@ test("generate jsx element with namespaces components", () => {
123125
usedDataSources: new Map(),
124126
indexesWithinAncestors: new Map(),
125127
metas: new Map(),
128+
tagsOverrides: {},
126129
children: [{ type: "id", value: "body" }],
127130
...renderData(<library.Body ws:id="body"></library.Body>),
128131
})
@@ -139,6 +142,7 @@ test("generate jsx element with namespaces components", () => {
139142
usedDataSources: new Map(),
140143
indexesWithinAncestors: new Map(),
141144
metas: new Map(),
145+
tagsOverrides: {},
142146
children: [{ type: "id", value: "image" }],
143147
...renderData(<library.Image ws:id="image"></library.Image>),
144148
})
@@ -158,6 +162,7 @@ test("generate jsx element with literal props", () => {
158162
usedDataSources: new Map(),
159163
indexesWithinAncestors: new Map(),
160164
metas: new Map(),
165+
tagsOverrides: {},
161166
children: [{ type: "id", value: "body" }],
162167
...renderData(<$.Body ws:id="body" string="string" number={0}></$.Body>),
163168
})
@@ -176,6 +181,7 @@ test("generate jsx element with literal props", () => {
176181
usedDataSources: new Map(),
177182
indexesWithinAncestors: new Map(),
178183
metas: new Map(),
184+
tagsOverrides: {},
179185
children: [{ type: "id", value: "image" }],
180186
...renderData(
181187
<$.Image
@@ -203,6 +209,7 @@ test("ignore asset and page props", () => {
203209
usedDataSources: new Map(),
204210
indexesWithinAncestors: new Map(),
205211
metas: new Map(),
212+
tagsOverrides: {},
206213
children: [{ type: "id", value: "box" }],
207214
...renderData(
208215
<$.Box
@@ -229,6 +236,7 @@ test("generate jsx element with data sources and action", () => {
229236
usedDataSources: new Map(),
230237
indexesWithinAncestors: new Map(),
231238
metas: new Map(),
239+
tagsOverrides: {},
232240
children: [{ type: "id", value: "box" }],
233241
...renderData(
234242
<$.Box
@@ -261,6 +269,7 @@ test("generate jsx element with condition based on show prop", () => {
261269
usedDataSources: new Map(),
262270
indexesWithinAncestors: new Map(),
263271
metas: new Map(),
272+
tagsOverrides: {},
264273
children: [{ type: "id", value: "box" }],
265274
...renderData(<$.Box ws:id="box" data-ws-show={true}></$.Box>),
266275
})
@@ -277,6 +286,7 @@ test("generate jsx element with condition based on show prop", () => {
277286
usedDataSources: new Map(),
278287
indexesWithinAncestors: new Map(),
279288
metas: new Map(),
289+
tagsOverrides: {},
280290
children: [{ type: "id", value: "box" }],
281291
...renderData(<$.Box ws:id="box" data-ws-show={false}></$.Box>),
282292
})
@@ -288,6 +298,7 @@ test("generate jsx element with condition based on show prop", () => {
288298
usedDataSources: new Map(),
289299
indexesWithinAncestors: new Map(),
290300
metas: new Map(),
301+
tagsOverrides: {},
291302
children: [{ type: "id", value: "box" }],
292303
...renderData(
293304
<$.Box ws:id="box" data-ws-show={expression`${condition}`}></$.Box>
@@ -309,6 +320,7 @@ test("generate jsx children with text", () => {
309320
generateJsxChildren({
310321
scope: createScope(),
311322
metas: new Map(),
323+
tagsOverrides: {},
312324
children: [
313325
{ type: "text", value: "Some\ntext" },
314326
{ type: "text", value: 'Escaped "text"' },
@@ -336,6 +348,7 @@ test("exclude text placeholders", () => {
336348
generateJsxChildren({
337349
scope: createScope(),
338350
metas: new Map(),
351+
tagsOverrides: {},
339352
children: [
340353
{ type: "text", value: "Text" },
341354
{ type: "text", value: "Placeholder text", placeholder: true },
@@ -361,6 +374,7 @@ test("generate jsx children with expression", () => {
361374
generateJsxChildren({
362375
scope: createScope(),
363376
metas: new Map(),
377+
tagsOverrides: {},
364378
children: [
365379
{ type: "expression", value: "'Hello ' + $ws$dataSource$var" },
366380
],
@@ -392,6 +406,7 @@ test("generate jsx children with nested instances", () => {
392406
generateJsxChildren({
393407
scope: createScope(),
394408
metas: new Map(),
409+
tagsOverrides: {},
395410
children: [{ type: "id", value: "form" }],
396411
usedDataSources: new Map(),
397412
indexesWithinAncestors: new Map(),
@@ -421,6 +436,7 @@ test("deduplicate base and namespaced components with same short name", () => {
421436
generateJsxChildren({
422437
scope: createScope(),
423438
metas: new Map(),
439+
tagsOverrides: {},
424440
children: [
425441
{ type: "id", value: "button1" },
426442
{ type: "id", value: "button2" },
@@ -449,6 +465,7 @@ test("generate collection component as map", () => {
449465
generateJsxChildren({
450466
scope: createScope(),
451467
metas: new Map(),
468+
tagsOverrides: {},
452469
children: [{ type: "id", value: "list" }],
453470
usedDataSources: new Map(),
454471
indexesWithinAncestors: new Map(),

0 commit comments

Comments
 (0)