Skip to content

Commit

Permalink
Updates tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kj committed May 30, 2024
1 parent 1379d86 commit 573f633
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enhance/custom-element-mixin",
"version": "1.2.3-next.0",
"version": "1.2.2",
"description": "Custom Element mixin that enables the reuse of single file components",
"main": "index.mjs",
"scripts": {
Expand Down Expand Up @@ -29,5 +29,8 @@
"morphdom": "^2.7.2",
"npm-run-all": "^4.1.5",
"playwright": "^1.44.0"
},
"dependencies": {
"@enhance/morphdom-mixin": "^1.1.3-next.0"
}
}
12 changes: 7 additions & 5 deletions test/diff-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@
? this.shadowRoot
: this

const slotEl = document.createElement('div')
const slottedElements = root.querySelectorAll('[slot=""]')
for (const value of slottedElements.values()) {
slotEl.appendChild(value)
if (!this.shadowRoot) {
const slotEl = document.createElement('div')
const slottedElements = root.querySelectorAll('[slot=""]')
for (const value of slottedElements.values()) {
slotEl.appendChild(value)
}
updated.innerHTML = this.expandSlots(slotEl.innerHTML, updated.innerHTML)
}
updated.innerHTML = this.expandSlots(slotEl.innerHTML, updated.innerHTML)

morphdom(
root,
Expand Down

0 comments on commit 573f633

Please sign in to comment.