Skip to content

Commit

Permalink
Adds test to check removal of style blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
kj committed Aug 3, 2023
1 parent bb4ae76 commit 776dd04
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/mixin-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
const { attrs={} } = state
const { heading='default' } = attrs
return html`
<style>
:host {
color: red;
}
</style>
<h1>${heading}</h1>
`
}
Expand Down Expand Up @@ -65,6 +70,11 @@ <h1>${heading}</h1>
const textContentThree = testComponentThree.querySelector('h1').textContent
assert.equal(textContentThree, 'three', 'Should expand template with heading')
})
it('should remove style blocks', ()=> {
const testComponent = document.querySelector('my-element[heading="one"]')
const styles = testComponent.querySelector('style')
assert.isNull(styles)
})
})
})
</script>
Expand Down

0 comments on commit 776dd04

Please sign in to comment.