update test

pull/1864/head
Rich Harris 7 years ago
parent fecda031fc
commit 4ad548c44d

@ -1,7 +1,8 @@
<script> <script>
import { onMount } from 'svelte'; import { onMount } from 'svelte';
let id; export let value;
export let id;
const initialValues = { const initialValues = {
'id-0': 'zero', 'id-0': 'zero',

@ -14,11 +14,11 @@ export default {
</ol> </ol>
`, `,
test (assert, component, target, window) { async test(assert, component, target, window) {
const input = target.querySelector('input'); const input = target.querySelector('input');
input.value = 4; input.value = 4;
input.dispatchEvent(new window.Event('input')); await input.dispatchEvent(new window.Event('input'));
assert.htmlEqual(target.innerHTML, ` assert.htmlEqual(target.innerHTML, `
<input type='number'> <input type='number'>

@ -14,8 +14,8 @@
<input type='number' bind:value={count}> <input type='number' bind:value={count}>
<ol> <ol>
{#each ids as id} {#each ids() as id}
<Nested {id} bind:value="idToValue[id]"> <Nested {id} bind:value={idToValue[id]}>
{id}: value is {idToValue[id]} {id}: value is {idToValue[id]}
</Nested> </Nested>
{/each} {/each}

Loading…
Cancel
Save