mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
559 B
25 lines
559 B
6 years ago
|
export default {
|
||
|
html: `
|
||
|
<div>
|
||
|
<p>count in default slot: 0</p>
|
||
|
<p slot="foo">count in foo slot: 0</p>
|
||
|
<p slot="bar">count in bar slot: 0</p>
|
||
|
<button>+1</button>
|
||
|
</div>
|
||
|
`,
|
||
|
|
||
|
async test({ assert, target, window }) {
|
||
|
const button = target.querySelector('button');
|
||
|
|
||
|
await button.dispatchEvent(new window.MouseEvent('click'));
|
||
|
|
||
|
assert.htmlEqual(target.innerHTML, `
|
||
|
<div>
|
||
|
<p>count in default slot: 1</p>
|
||
|
<p slot="foo">count in foo slot: 1</p>
|
||
|
<p slot="bar">count in bar slot: 1</p>
|
||
|
<button>+1</button>
|
||
|
</div>
|
||
|
`);
|
||
|
}
|
||
|
}
|