From dfaa1d13e822db3bc878b07d99b1576608c21039 Mon Sep 17 00:00:00 2001 From: Elliott Marquez <5981958+e111077@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:12:54 -0800 Subject: [PATCH] update tests --- packages/astro/test/custom-elements.test.js | 6 +++--- packages/integrations/lit/client-shim.min.js | 4 ++-- packages/integrations/lit/test/server.test.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/astro/test/custom-elements.test.js b/packages/astro/test/custom-elements.test.js index b66c648a45d4..51e8ece341fa 100644 --- a/packages/astro/test/custom-elements.test.js +++ b/packages/astro/test/custom-elements.test.js @@ -23,7 +23,7 @@ describe('Custom Elements', () => { expect($('my-element')).to.have.lengthOf(1); // test 2: shadow rendered - expect($('my-element template[shadowroot=open]')).to.have.lengthOf(1); + expect($('my-element template[shadowroot=open][shadowrootmode=open]')).to.have.lengthOf(1); }); it('Works with exported tagName', async () => { @@ -34,7 +34,7 @@ describe('Custom Elements', () => { expect($('my-element')).to.have.lengthOf(1); // test 2: shadow rendered - expect($('my-element template[shadowroot=open]')).to.have.lengthOf(1); + expect($('my-element template[shadowroot=open][shadowrootmode=open]')).to.have.lengthOf(1); }); it.skip('Hydration works with exported tagName', async () => { @@ -46,7 +46,7 @@ describe('Custom Elements', () => { expect($('my-element')).to.have.lengthOf(1); // test 2: shadow rendered - expect($('my-element template[shadowroot=open]')).to.have.lengthOf(1); + expect($('my-element template[shadowroot=open][shadowrootmode=open]')).to.have.lengthOf(1); // Hydration // test 3: Component and polyfill scripts bundled separately diff --git a/packages/integrations/lit/client-shim.min.js b/packages/integrations/lit/client-shim.min.js index afae053acc4e..0965e6a78bb6 100644 --- a/packages/integrations/lit/client-shim.min.js +++ b/packages/integrations/lit/client-shim.min.js @@ -8,7 +8,7 @@ var b = (t, n) => { function s() { if (d === void 0) { let t = document.createElement('div'); - (t.innerHTML = '
'), + (t.innerHTML = ''), (d = !!t.firstElementChild.shadowRoot); } return d; @@ -80,7 +80,7 @@ async function g() { window.addEventListener('DOMContentLoaded', () => t(document.body), { once: true }); } var x = new DOMParser() - .parseFromString('', 'text/html', { + .parseFromString('', 'text/html', { includeShadowRoots: !0, }) .querySelector('p'); diff --git a/packages/integrations/lit/test/server.test.js b/packages/integrations/lit/test/server.test.js index e7b5e98f9dcc..439c0877da72 100644 --- a/packages/integrations/lit/test/server.test.js +++ b/packages/integrations/lit/test/server.test.js @@ -38,7 +38,7 @@ describe('renderToStaticMarkup', () => { customElements.define(tagName, class extends LitElement {}); const render = await renderToStaticMarkup(tagName); expect(render).to.deep.equal({ - html: `<${tagName}>${tagName}>`, + html: `<${tagName}>${tagName}>`, }); });