summaryrefslogtreecommitdiff
path: root/packages/integrations/lit/test
diff options
context:
space:
mode:
authorGravatar Augustine Kim <augustinekim@google.com> 2023-11-08 05:25:39 -0800
committerGravatar GitHub <noreply@github.com> 2023-11-08 08:25:39 -0500
commit23c9a30ad859398d62a013d639b5b2716b583331 (patch)
treebe5a476a90fff6e6482b511b6a941121a80a8a4d /packages/integrations/lit/test
parent3c17b59f2d55b674299a7f2dfe38bc4a1000e9e3 (diff)
downloadastro-23c9a30ad859398d62a013d639b5b2716b583331.tar.gz
astro-23c9a30ad859398d62a013d639b5b2716b583331.tar.zst
astro-23c9a30ad859398d62a013d639b5b2716b583331.zip
Fix Lit integration hydration ordering (#9018)
* Provide renderer instance to `customElementHostStack` * Add changeset
Diffstat (limited to 'packages/integrations/lit/test')
-rw-r--r--packages/integrations/lit/test/server.test.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/integrations/lit/test/server.test.js b/packages/integrations/lit/test/server.test.js
index 557832db5..08c69965a 100644
--- a/packages/integrations/lit/test/server.test.js
+++ b/packages/integrations/lit/test/server.test.js
@@ -112,6 +112,9 @@ describe('renderToStaticMarkup', () => {
const render = await renderToStaticMarkup(tagName);
const $ = cheerio.load(render.html);
expect($(`${tagName} template`).text()).to.contain('child');
+ // Child component should have `defer-hydration` attribute so it'll only
+ // hydrate after the parent hydrates
+ expect($(childTagName).attr('defer-hydration')).to.equal('');
});
it('should render DSD attributes based on shadowRootOptions', async () => {