mirror of https://github.com/sveltejs/svelte
parent
c0fb21dee9
commit
f7fa81f924
@ -0,0 +1,8 @@
|
||||
<p>Hello {name}</p>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
tag: 'custom-element',
|
||||
props: ['name']
|
||||
};
|
||||
</script>
|
@ -0,0 +1,8 @@
|
||||
import * as assert from 'assert';
|
||||
import './main.html';
|
||||
|
||||
export default function (target) {
|
||||
const el = target.ownerDocument.body.querySelector('custom-element');
|
||||
const p = el.shadowRoot.querySelector('p');
|
||||
assert.equal(p.textContent, 'Hello world');
|
||||
}
|
Loading…
Reference in new issue