mirror of https://github.com/sveltejs/svelte
parent
7bc2ea811b
commit
cc876eac19
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
let fooText = 'foo';
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<slot someText={fooText}></slot>
|
||||
</div>
|
@ -0,0 +1,20 @@
|
||||
export default {
|
||||
html: `
|
||||
<div>
|
||||
<p>foo</p>
|
||||
</div>
|
||||
`,
|
||||
|
||||
async test({ assert, target, window }) {
|
||||
const div = target.querySelector('div');
|
||||
const click = new window.MouseEvent('click');
|
||||
|
||||
await div.dispatchEvent(click);
|
||||
|
||||
assert.htmlEqual(target.innerHTML, `
|
||||
<div>
|
||||
<p>foo</p>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
};
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Nested from './Nested.svelte';
|
||||
</script>
|
||||
|
||||
<Nested let:someText={someText}>
|
||||
<p>{someText}</p>
|
||||
</Nested>
|
Loading…
Reference in new issue