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
524 B
25 lines
524 B
5 years ago
|
export default {
|
||
|
html: `
|
||
|
012345678910111213141516171819202122232425262728293031323334353637383940
|
||
|
expected: true
|
||
|
if: true
|
||
|
<button></button>
|
||
|
`,
|
||
|
|
||
|
async test({ assert, component, target, window }) {
|
||
|
const button = target.querySelector("button");
|
||
|
await button.dispatchEvent(new window.MouseEvent("click"));
|
||
|
|
||
|
assert.htmlEqual(
|
||
|
target.innerHTML,
|
||
|
`
|
||
|
112345678910111213141516171819202122232425262728293031323334353637383940
|
||
|
expected: false
|
||
|
if: false
|
||
|
<div></div>
|
||
|
<button></button>
|
||
|
`
|
||
|
);
|
||
|
}
|
||
|
};
|