Skip to content

Commit

Permalink
Fixed failing build and improved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jahilldev committed Apr 27, 2022
1 parent 8eb6c1c commit 709b040
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/preactement/tests/define.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ describe('define()', () => {

expect(root.innerHTML).toContain('');

root.appendChild(wrapper.appendChild(element));
root.appendChild(wrapper);
wrapper.appendChild(element);

expect(root.innerHTML).toContain(`<h2>${customTitle}</h2><em></em><p>${customText}</p>`);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/reactement/src/define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function define<P = {}>(
const elementTag = getElementTag(tagName);

if (!preRender) {
customElements.define(elementTag, setupElement(child, options););
customElements.define(elementTag, setupElement(child, options));

return;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/reactement/tests/define.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ describe('define()', () => {

expect(root.innerHTML).toContain('');

root.appendChild(wrapper.appendChild(element));
root.appendChild(wrapper);
wrapper.appendChild(element);

expect(root.innerHTML).toContain(`<h2>${customTitle}</h2><em></em><p>${customText}</p>`);
});
Expand Down

0 comments on commit 709b040

Please sign in to comment.