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> <p>i am a widget</p>

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

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

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

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

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

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

Loading…
Cancel
Save