update tests

pull/1864/head
Rich Harris 7 years ago
parent 4c2fdcf657
commit f13c2272df

@ -1 +1,11 @@
<script>
import { onDestroy, createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
onDestroy(() => {
dispatch('destroy');
});
</script>
<p>i am a widget</p>

@ -1,5 +1,5 @@
export default {
test(assert, component) {
component.l1.destroy();
component.l1.$destroy();
}
};

@ -1,5 +1,7 @@
<script>
import Level1 from './Level1.html';
export let l1;
</script>
<Level1 ref:l1 />

@ -1,4 +1,6 @@
<div class="level2" ref:wat>
<div class="level2">
<h4>level 2</h4>
{#if condition}
<span>TRUE! <slot></slot></span>

@ -1,4 +1,4 @@
<div class="level3" ref:thingy>
<div class="level3">
<h4>level 3</h4>
<slot></slot>
</div>

@ -1,7 +1,8 @@
export default {
html: '<div><p>i am a widget</p></div>',
test(assert, component) {
const widget = component.widget;
const { widget } = component;
assert.ok(widget.isWidget);
}
};

@ -1,5 +1,6 @@
<script>
import Widget from './Widget.html';
export let widget;
</script>
<div>

Loading…
Cancel
Save