pull/1864/head
Rich Harris 7 years ago
parent f765da25e4
commit fc89c0f95e

@ -1,3 +1,9 @@
<script>
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
const destroy = () => dispatch('destroy');
</script>
<div class='modal-background' on:click='{destroy}'></div>
<div class='modal'>

@ -12,11 +12,11 @@ export default {
</div>
`,
test(assert, component, target, window) {
async test(assert, component, target, window) {
const button = target.querySelector('button');
const click = new window.MouseEvent('click');
button.dispatchEvent(click);
await button.dispatchEvent(click);
assert.htmlEqual(target.innerHTML, `
<button>show modal</button>

Loading…
Cancel
Save