Thomas Ghysels 6 years ago
parent c0fb21dee9
commit f7fa81f924

@ -7,6 +7,7 @@ import { addLineNumbers, loadConfig, loadSvelte } from "../helpers.js";
const page = `
<body>
<custom-element name="world"></custom-element>
<main></main>
<script src='/bundle.js'></script>
</body>

@ -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…
Cancel
Save