Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
e111077 committed Jan 31, 2023
1 parent 09ea9c3 commit dfaa1d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/astro/test/custom-elements.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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 () => {
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/integrations/lit/client-shim.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var b = (t, n) => {
function s() {
if (d === void 0) {
let t = document.createElement('div');
(t.innerHTML = '<div><template shadowroot="open"></template></div>'),
(t.innerHTML = '<div><template shadowroot="open" shadowrootmode="open"></template></div>'),
(d = !!t.firstElementChild.shadowRoot);
}
return d;
Expand Down Expand Up @@ -80,7 +80,7 @@ async function g() {
window.addEventListener('DOMContentLoaded', () => t(document.body), { once: true });
}
var x = new DOMParser()
.parseFromString('<p><template shadowroot="open"></template></p>', 'text/html', {
.parseFromString('<p><template shadowroot="open" shadowrootmode="open"></template></p>', 'text/html', {
includeShadowRoots: !0,
})
.querySelector('p');
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/lit/test/server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('renderToStaticMarkup', () => {
customElements.define(tagName, class extends LitElement {});
const render = await renderToStaticMarkup(tagName);
expect(render).to.deep.equal({
html: `<${tagName}><template shadowroot="open"><!--lit-part--><!--/lit-part--></template></${tagName}>`,
html: `<${tagName}><template shadowroot="open" shadowrootmode="open"><!--lit-part--><!--/lit-part--></template></${tagName}>`,
});
});

Expand Down

0 comments on commit dfaa1d1

Please sign in to comment.