Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

hydrate-split-modules.test.ts

643 lines22.4 KB

1import { afterEach, describe, expect, test } from 'vitest'
2import { createHydrateCompilerPlugin } from '../src/hydrate-when-transform'
3import {
4 compileCode,
5 compileFirstChunk,
6 compileHydrate,
7 evaluateHydrateParent,
8 evaluateModule,
9 getBoundaryIds,
10 getChunkComponent,
11 getChunkIds,
12 hydrateParentStubs,
13 importSources,
14 loadChunk,
15 parentImportSources,
16 renderChunk,
17} from './regression-helpers'
18import { declarationOf, getModuleErrors } from './validate-module'
19​
20// On the client `<Hydrate>` children move into a lazily loaded chunk module
21// and the parent renders the chunk component in their place; on the server
22// the children render inline and the client-only `fallback` is stripped.
23// Both modules must stay valid and behave like the original source.
24​
25const head = `import { Hydrate } from '@tanstack/react-start'\n`
26​
27describe('the parent module', () => {
28 const widgetPage = `${head}import { visible } from '@tanstack/react-start/hydration'
29import { Chart, FallbackPane } from './widgets'
30import { formatValue } from './format'
31const chartTitle = formatValue('Revenue')
32export function Page() {
33 return <Hydrate when={visible()} fallback={<FallbackPane />}><Chart title={chartTitle} /></Hydrate>
34}`
35​
36 test('client: bindings only the split children use leave the parent', async () => {
37 const { parent, chunks } = await compileHydrate('client', widgetPage)
38 expect(chunks[0]).toMatch(declarationOf('chartTitle'))
39 expect(parent).not.toMatch(declarationOf('chartTitle'))
40 expect(parent).not.toMatch(/\bChart\b/)
41 expect(importSources(parent)).toEqual(['./widgets'])
42 })
43​
44 test('server: bindings only the stripped fallback uses are removed', async () => {
45 const { parent } = await compileHydrate('server', widgetPage)
46 expect(parent).not.toContain('FallbackPane')
47 })
48​
49 test("client: 'use client' stays first in the parent module and the split chunk", async () => {
50 const { parent, chunks } = await compileHydrate(
51 'client',
52 `'use client'
53${head}import { Chart } from './chart'
54export function Page() {
55 return <Hydrate><Chart /></Hydrate>
56}`,
57 )
58 expect(parent).toMatch(/^\s*['"]use client['"]/)
59 expect(chunks[0]).toMatch(/^\s*['"]use client['"]/)
60 })
61​
62 test('client: a self-closing Hydrate with a children prop renders nothing next to its boundary', async () => {
63 const { parent } = await compileHydrate(
64 'client',
65 `${head}import { idle } from '@tanstack/react-start/hydration'
66import { Chart } from './chart'
67export function Page() {
68 return <section><Hydrate when={idle()} children={<Chart />} /></section>
69}`,
70 )
71 expect(await getModuleErrors(parent)).toEqual([])
72 const module = await evaluateModule(parent, {
73 ...hydrateParentStubs,
74 './chart': { Chart: () => 'chart' },
75 })
76 // Whether the children prop renders inline or from the chunk, nothing
77 // may render next to the boundary.
78 expect(module.Page()).toMatch(
79 /^<section>\[(?:chart|lazy\(\))\]<\/section>$/,
80 )
81 })
82​
83 test('client: a stale h attribute is replaced by the generated boundary id', async () => {
84 const { parent } = await compileHydrate(
85 'client',
86 `${head}export function Page() {
87 return <Hydrate h="stale"><p>child</p></Hydrate>
88}`,
89 )
90 expect(parent).not.toContain('stale')
91 expect(getBoundaryIds(parent)).toHaveLength(1)
92 })
93​
94 // String values of `split` are accepted too, for untyped or JS callers.
95 test('client: split="false" keeps function-as-children in place', async () => {
96 const parent = await compileCode(
97 'client',
98 `${head}export function Page() {
99 return <Hydrate split="false">{() => <p>child</p>}</Hydrate>
100}`,
101 { compilerPlugins: [createHydrateCompilerPlugin()] },
102 )
103 expect(parent).toBeNull()
104 })
105​
106 test.each(['split', 'split="true"'])(
107 'client: %s splits the children',
108 async (split) => {
109 const { chunks } = await compileHydrate(
110 'client',
111 `${head}export function Page() {
112 return <Hydrate ${split}><p>child</p></Hydrate>
113}`,
114 )
115 expect(chunks).toHaveLength(1)
116 expect(await renderChunk(chunks[0]!)).toBe('<p>child</p>')
117 },
118 )
119​
120 // An object spread into one boundary only is stripped of its fallback; a
121 // shared or computed object may be observed elsewhere and is kept.
122 test.each([
123 {
124 name: 'used once',
125 code: `const opts = { fallback: <p>server-fallback</p>, when: true }
126export function Page() { return <Hydrate {...opts}><p>child</p></Hydrate> }`,
127 kept: false,
128 },
129 {
130 name: 'shared by two boundaries',
131 code: `const opts = { fallback: <p>server-fallback</p> }
132export function Page() { return <><Hydrate {...opts}><p>a</p></Hydrate><Hydrate {...opts}><p>b</p></Hydrate></> }`,
133 kept: true,
134 },
135 {
136 name: 'returned by a call',
137 code: `const makeOpts = () => ({ fallback: <p>server-fallback</p> })
138const opts = makeOpts()
139export function Page() { return <Hydrate {...opts}><p>child</p></Hydrate> }`,
140 kept: true,
141 },
142 ])(
143 'server: a fallback in a spread object $name is kept: $kept',
144 async ({ code, kept }) => {
145 const { parent } = await compileHydrate('server', `${head}${code}`)
146 expect(await getModuleErrors(parent)).toEqual([])
147 expect(parent.includes('server-fallback')).toBe(kept)
148 },
149 )
150​
151 // Source: Qwik optimizer example_functional_component_capture_props
152 test('server: params used only by the fallback keep later params in place', async () => {
153 const { parent } = await compileHydrate(
154 'server',
155 `${head}export function List({ items }) {
156 return <ul>{items.map((item, i) => <Hydrate key={i} fallback={<p>{item}</p>}><li>{i}</li></Hydrate>)}</ul>
158export function Card(label, body) {
159 return <Hydrate fallback={<p>{label}</p>}><p>{body}</p></Hydrate>
160}`,
161 )
162 const module = await evaluateModule(parent, hydrateParentStubs)
163 expect(module.List({ items: ['a', 'b'] })).toBe(
164 '<ul>[<li>0</li>][<li>1</li>]</ul>',
165 )
166 expect(module.Card('L', 'B')).toBe('[<p>B</p>]')
167 })
168​
169 // Source: Qwik optimizer should_transform_handler_in_for_of_loop
170 test('server: a loop variable used only by the fallback keeps the module valid', async () => {
171 const { parent } = await compileHydrate(
172 'server',
173 `${head}export function List({ xs }) {
174 const out = []
175 for (const x of xs) out.push(<Hydrate fallback={<p>{x}</p>}><p>child</p></Hydrate>)
176 return out
177}`,
178 )
179 expect(await getModuleErrors(parent)).toEqual([])
180 })
181​
182 // Source: Qwik optimizer should_keep_non_migrated_binding_from_shared_destructuring_declarator
183 test('server: a destructuring shared by the fallback and the children keeps the children binding', async () => {
184 const { parent } = await compileHydrate(
185 'server',
186 `${head}export function Page(props) {
187 const { a, b } = props
188 return <Hydrate fallback={<p>{a}</p>}><p>{b}</p></Hydrate>
189}`,
190 )
191 const module = await evaluateModule(parent, hydrateParentStubs)
192 expect(module.Page({ a: 'A', b: 'B' })).toBe('[<p>B</p>]')
193 })
194​
195 // Source: Qwik optimizer example_mutable_children, issue_5008
196 test('client: boundaries in conditionals and callbacks load the chunk the server id names', async () => {
197 const code = `${head}export function Page({ flag, items }) {
198 return <div>
199 {flag ? <Hydrate><p>yes</p></Hydrate> : <Hydrate><p>no</p></Hydrate>}
200 {flag && <Hydrate><p>and</p></Hydrate>}
201 {items.map(function (item, idx) { return <Hydrate key={idx}><p>{'fn' + item}</p></Hydrate> })}
202 {items.map((item) => <Hydrate key={item}><p>{'arrow' + item}</p></Hydrate>)}
203 </div>
205export function Other({ early }) {
206 if (early) { return <Hydrate><p>early</p></Hydrate> }
207 return <Hydrate><p>late</p></Hydrate>
208}`
209 const server = await compileHydrate('server', code)
210 const { parent, plugin } = await compileHydrate('client', code)
211 const serverIds = getBoundaryIds(server.parent)
212 expect(getBoundaryIds(parent)).toEqual(serverIds)
213 const rendered: Array<unknown> = []
214 for (const id of serverIds) {
215 const chunkId = getChunkIds(parent).find((chunk) =>
216 chunk.endsWith(`=${id}`),
217 )
218 rendered.push(
219 await renderChunk(loadChunk(plugin, 'client', chunkId!)!, {
220 item: 'x',
221 }),
222 )
223 }
224 expect(rendered).toEqual([
225 '<p>yes</p>',
226 '<p>no</p>',
227 '<p>and</p>',
228 '<p>fnx</p>',
229 '<p>arrowx</p>',
230 '<p>early</p>',
231 '<p>late</p>',
232 ])
233 })
234​
235 // Source: Qwik optimizer example_strip_exports_used
236 test.each([
237 {
238 name: 'an exported server fn also called by the parent',
239 code: `import { Hydrate, createServerFn } from '@tanstack/react-start'
240export const greet = createServerFn().handler(async () => 'greet-handler-marker')
241export function Page() {
242 return <><button onClick={() => greet()}>a</button><Hydrate><button onClick={() => greet()}>b</button></Hydrate></>
243}`,
244 },
245 {
246 name: 'a private server fn only called by the children',
247 code: `import { Hydrate, createServerFn } from '@tanstack/react-start'
248const greet = createServerFn().handler(async () => 'greet-handler-marker')
249export function Page() {
250 return <Hydrate><button onClick={() => greet()}>b</button></Hydrate>
251}`,
252 },
253 ])(
254 'client: $name calls the provider id from the split chunk',
255 async ({ code }) => {
256 const { parent, plugin } = await compileHydrate('client', code)
257 const compiled = await compileFirstChunk(plugin, parent)
258 const chunk =
259 compiled.code ?? loadChunk(plugin, 'client', getChunkIds(parent)[0]!)!
260 expect(await getModuleErrors(chunk)).toEqual([])
261 expect(chunk).not.toContain('greet-handler-marker')
262 const provider = await evaluateModule(
263 (await compileCode('provider', code))!,
264 )
265 // The chunk compiles its own caller of the provider, or imports the
266 // parent's caller.
267 const ids = Object.keys(compiled.serverFns)
268 if (ids.length > 0) {
269 expect(ids).toEqual([provider.greet_createServerFn_handler.meta.id])
270 } else {
271 expect(parentImportSources(chunk)).not.toEqual([])
272 }
273 },
274 )
275})
276​
277describe('the split chunk', () => {
278 test.each([
279 { name: 'entities', text: '&amp; &#38; &#x26;', rendered: '& & &' },
280 {
281 name: 'multi-line text with entities',
282 text: '\n Fish &amp;\n Chips &copy;\n ',
283 rendered: 'Fish & Chips Β©',
284 },
285 ])(
286 'client: a text-only child renders like JSX text: $name',
287 async ({ text, rendered }) => {
288 const { chunks } = await compileHydrate(
289 'client',
290 `${head}export function Page() {
291 return <Hydrate>${text}</Hydrate>
292}`,
293 )
294 // Whitespace collapsing aside, the text must render like the
295 // server-rendered JSX text.
296 const output = await renderChunk(chunks[0]!)
297 expect(output.replace(/\s+/g, ' ').trim()).toBe(rendered)
298 },
299 )
300​
301 test('client: children may contain return statements', async () => {
302 const { chunks } = await compileHydrate(
303 'client',
304 `${head}const letters = ['a', 'b']
305export function Page() {
306 return <Hydrate><ul>{letters.map((letter) => { const upper = letter.toUpperCase(); return <li>{upper}</li> })}</ul></Hydrate>
307}`,
308 )
309 expect(await getModuleErrors(chunks[0]!)).toEqual([])
310 expect(await renderChunk(chunks[0]!)).toBe('<ul><li>A</li><li>B</li></ul>')
311 })
312​
313 // Leaving such a boundary unsplit is valid too.
314 test('client: empty and comment-only boundaries load chunks that render nothing', async () => {
315 const { parent, chunks } = await compileHydrate(
316 'client',
317 `${head}export function Page() {
318 return <div><Hydrate></Hydrate><Hydrate>{/* nothing */}</Hydrate></div>
319}`,
320 )
321 expect(await getModuleErrors(parent)).toEqual([])
322 expect(chunks.length).toBeLessThanOrEqual(2)
323 for (const chunk of chunks) {
324 expect(await getModuleErrors(chunk)).toEqual([])
325 expect(await renderChunk(chunk)).toBeNull()
326 }
327 })
328​
329 test('client: chunk ids stay loadable when the same source is compiled again', async () => {
330 const source = `${head}export function Page() {
331 return <Hydrate><p>chunk-marker</p></Hydrate>
332}`
333 const { parent, plugin } = await compileHydrate('client', source)
334 const [id] = getChunkIds(parent)
335 expect(loadChunk(plugin, 'client', id!)).toContain('chunk-marker')
336 await compileCode('client', source, { compilerPlugins: [plugin] })
337 expect(loadChunk(plugin, 'client', id!)).toContain('chunk-marker')
338 // Unknown boundaries and ids without a split id are not Hydrate chunks.
339 expect(loadChunk(plugin, 'client', id!.replace(/=0_/, '=5_'))).toBeNull()
340 expect(
341 loadChunk(plugin, 'client', '/test/src/module.tsx?other=1'),
342 ).toBeNull()
343 })
344​
345 // Source: Qwik optimizer example_capture_imports,
346 // jsx_member_tag_object_is_captured, example_jsx
347 test('client: default, namespace and aliased imports and namespaced names in the children', async () => {
348 const { chunks } = await compileHydrate(
349 'client',
350 `${head}import Chart from './chart'
351import * as UI from './ui'
352import { format as fmt, default as theme } from './format'
353export function Page() {
354 return <Hydrate><Chart /><UI.Button label={fmt(theme)} /><svg><use xlink:href="#icon" /></svg></Hydrate>
355}`,
356 )
357 expect(await getModuleErrors(chunks[0]!)).toEqual([])
358 expect(
359 await renderChunk(
360 chunks[0]!,
361 {},
362 {
363 './chart': { default: () => '<chart></chart>' },
364 './ui': {
365 Button: ({ label }: { label: string }) =>
366 `<button>${label}</button>`,
367 },
368 './format': {
369 format: (value: string) => `[${value}]`,
370 default: 'dark',
371 },
372 },
373 ),
374 ).toBe('<chart></chart><button>[dark]</button><svg><use></use></svg>')
375 })
376​
377 // Source: Qwik optimizer should_handle_dangerously_set_inner_html
378 test('client: string attributes keep their value', async () => {
379 const element = `<span title="Fish &amp; Chips &copy;" data-q='say "hi"' data-n="a
380b" dangerouslySetInnerHTML={{ __html: "<h1>I'm an h1!</h1>" }} />`
381 const { chunks } = await compileHydrate(
382 'client',
383 `${head}export function Page() {
384 return <Hydrate>${element}</Hydrate>
385}`,
386 )
387 // Render the props instead of the element.
388 const propsRuntime = `const __Fragment = null
389const __jsx = (type, props) => JSON.stringify(props)
391 const expected = await evaluateModule(
392 `export const H0 = () => ${element}`,
393 {},
394 propsRuntime,
395 )
396 const module = await evaluateModule(chunks[0]!, {}, propsRuntime)
397 expect(getChunkComponent(module)({})).toBe(expected.H0())
398 })
399​
400 // Source: Qwik optimizer example_default_export
401 test('client: an anonymous default-exported component splits its boundary', async () => {
402 const { parent, chunks } = await compileHydrate(
403 'client',
404 `${head}const label = 'default'
405export default () => <Hydrate><p>{label}</p></Hydrate>`,
406 )
407 expect(await getModuleErrors(parent)).toEqual([])
408 expect(await renderChunk(chunks[0]!)).toBe('<p>default</p>')
409 })
410​
411 // Source: Qwik optimizer example_invalid_references,
412 // should_migrate_destructured_binding_with_imported_dependency
413 test('client: a module-level destructuring of an import moves into the chunk with the import', async () => {
414 const { chunks } = await compileHydrate(
415 'client',
416 `${head}import { source } from './lib'
417const fallback = 'd'
418const [a, { b = fallback, ...rest }] = source
419export function Page() {
420 return <Hydrate><p>{[a, b, JSON.stringify(rest)].join('|')}</p></Hydrate>
421}`,
422 )
423 expect(await getModuleErrors(chunks[0]!)).toEqual([])
424 expect(
425 await renderChunk(
426 chunks[0]!,
427 {},
428 { './lib': { source: ['A', { extra: 'x' }] } },
429 ),
430 ).toBe('<p>A|d|{"extra":"x"}</p>')
431 })
432​
433 // Source: Qwik optimizer should_preserve_let_when_migrated_into_segment
434 test('client: a module-level let used only by the children stays mutable', async () => {
435 const { chunks } = await compileHydrate(
436 'client',
437 `${head}let renders = 0
438export function Page() {
439 return <Hydrate><p>{++renders}</p></Hydrate>
440}`,
441 )
442 const component = getChunkComponent(await evaluateModule(chunks[0]!))
443 expect(component({})).toBe('<p>1</p>')
444 expect(component({})).toBe('<p>2</p>')
445 })
446​
447 // Source: Qwik optimizer should_keep_non_migrated_binding_from_shared_destructuring_declarator
448 // (+ _array_destructuring_declarator, _with_rest)
449 test.each([
450 { name: 'object', declaration: `const { a, b } = { a: 'A', b: 'B' }` },
451 { name: 'array', declaration: `const [a, b] = ['A', 'B']` },
452 { name: 'rest', declaration: `const { a, ...b } = { a: 'A', c: 'B' }` },
453 ])(
454 'client: an $name destructuring shared by the parent and the children keeps both bindings',
455 async ({ declaration }) => {
456 const { parent, chunks, plugin } = await compileHydrate(
457 'client',
458 `${head}${declaration}
459export const fromRoot = () => JSON.stringify(b)
460export function Page() {
461 return <Hydrate><p>{a}</p></Hydrate>
462}`,
463 )
464 const { module, parentModuleStubs } = await evaluateHydrateParent(
465 plugin,
466 parent,
467 )
468 expect(module.fromRoot()).toContain('B')
469 expect(
470 await renderChunk(chunks[0]!, {}, await parentModuleStubs(chunks[0]!)),
471 ).toBe('<p>A</p>')
472 },
473 )
474​
475 // Source: Qwik optimizer should_keep_root_var_used_by_export_decl_and_qrl,
476 // example_segment_variable_migration,
477 // variable_migration_transitive_dep_used_by_other_segment
478 test('client: helpers shared by two boundaries and an export stay available to each', async () => {
479 const { parent, chunks, plugin } = await compileHydrate(
480 'client',
481 `${head}const scrollState = (el) => ({ x: el.x, y: el.y })
482const saveScroll = (s) => s.x + s.y
483const bigHelper = (el) => saveScroll(scrollState(el))
484export const direct = saveScroll(scrollState({ x: 1, y: 1 }))
485export function App() {
486 return <><Hydrate><p>{bigHelper({ x: 1, y: 2 })}</p></Hydrate><Hydrate><p>{scrollState({ x: 3, y: 4 }).y}</p></Hydrate></>
487}`,
488 )
489 expect(chunks).toHaveLength(2)
490 const { module, parentModuleStubs } = await evaluateHydrateParent(
491 plugin,
492 parent,
493 )
494 expect(module.direct).toBe(2)
495 const render = async (chunk: string) =>
496 renderChunk(chunk, {}, await parentModuleStubs(chunk))
497 expect(await render(chunks[0]!)).toBe('<p>3</p>')
498 expect(await render(chunks[1]!)).toBe('<p>4</p>')
499 })
500​
501 // Source: Qwik optimizer example_ts_enums (TypeScript-only declaration forms)
502 test('client: an overloaded function used by the children keeps its implementation', async () => {
503 const { chunks } = await compileHydrate(
504 'client',
505 `${head}function label(value: string): string
506function label(value: number): string
507function label(value: unknown) { return 'label:' + String(value) }
508export function Page() {
509 return <Hydrate><p>{label(1)}</p></Hydrate>
510}`,
511 )
512 expect(await getModuleErrors(chunks[0]!)).toEqual([])
513 expect(await renderChunk(chunks[0]!)).toBe('<p>label:1</p>')
514 })
515​
516 /** A page whose split child renders `Widget`, declared by `body`. */
517 const widgetPage = (body: string) => `${head}${body}
518export function Page(props) {
519 return <Hydrate><Widget {...props} /></Hydrate>
520}`
521​
522 // A component the children render moves into the chunk with the module
523 // bindings it reads.
524 // Source: React Compiler fixtures (per row)
525 test.each([
526 {
527 // try-catch-* fixtures
528 name: 'a catch parameter shadowing a module binding',
529 body: `const error = 'module'
530function Widget() {
531 let caught
532 try {
533 throw 'thrown'
534 } catch (error) {
535 caught = error
536 }
537 return <p>{caught}-{error}</p>
538}`,
539 expected: '<p>thrown-module</p>',
540 },
541 {
542 // fn-name-no-leak-to-nested-arrow.js
543 name: 'a named function expression shadowing a module binding',
544 body: `const helper = () => 'module'
545function Widget() {
546 const local = function helper(n) {
547 return n > 0 ? helper(n - 1) : 'local'
548 }
549 return <p>{local(2)}/{helper()}</p>
550}`,
551 expected: '<p>local/module</p>',
552 },
553 {
554 // destructure-*-default fixtures
555 name: 'parameter defaults reading module bindings',
556 body: `const fallback = 'fb'
557function Widget({ title = fallback, items: [first = fallback.toUpperCase()] = [] }) {
558 return <p>{title}{first}</p>
559}`,
560 expected: '<p>fbFB</p>',
561 },
562 {
563 // hoisting-simple-function-declaration.js
564 name: 'a hoisted local function reading a module binding declared later',
565 body: `function Widget() {
566 const x = format()
567 function format() {
568 return prefix + 'x'
569 }
570 return <p>{x}</p>
572const prefix = 'p-'`,
573 expected: '<p>p-x</p>',
574 },
575 {
576 // class fixtures (static blocks, private fields)
577 name: 'a local class with a static block and a private field',
578 body: `const base = 2
579function Widget() {
580 class Counter {
581 static start
582 static {
583 Counter.start = base * 2
584 }
585 #n = Counter.start
586 get n() {
587 return this.#n
588 }
589 }
590 return <p>{new Counter().n}</p>
591}`,
592 expected: '<p>4</p>',
593 },
594 ])(
595 'client: the chunk renders like the original with $name',
596 async ({ body, expected }) => {
597 const { chunks } = await compileHydrate('client', widgetPage(body))
598 expect(await getModuleErrors(chunks[0]!)).toEqual([])
599 expect(await renderChunk(chunks[0]!, { props: {} })).toBe(expected)
600 },
601 )
602​
603 describe('side effects of the component bodies it moves', () => {
604 afterEach(() => {
605 delete (globalThis as { __hydrateCalls?: unknown }).__hydrateCalls
606 })
607​
608 // An unused local initialized by a hook call or another side effect must
609 // still run when the chunk renders.
610 // Source: React Compiler fixtures react-namespace.js,
611 // unused-optional-method-assigned-to-variable.js, error.todo-reassign-const.js
612 test.each([
613 { name: 'a call', initializer: `useTracked('call')` },
614 { name: 'an optional call', initializer: `useTracked?.('optional')` },
615 {
616 name: 'a member read of a call',
617 initializer: `useTracked('member').length`,
618 },
619 ])(
620 'client: an unused local initialized by $name still runs',
621 async ({ initializer }) => {
622 const { chunks } = await compileHydrate(
623 'client',
624 widgetPage(`function useTracked(label) {
625 globalThis.__hydrateCalls.push(label)
626 return label
628function Widget() {
629 const unused = ${initializer}
630 return <p>widget</p>
631}`),
632 )
633 const calls: Array<string> = []
634 ;(globalThis as { __hydrateCalls?: Array<string> }).__hydrateCalls =
635 calls
636 expect(await renderChunk(chunks[0]!, { props: {} })).toBe(
637 '<p>widget</p>',
638 )
639 expect(calls).toHaveLength(1)
640 },
641 )
642 })
643})