Skip to content

Commit

Permalink
new failing test for #2086
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jul 9, 2019
1 parent 85e25a9 commit 65b28ed
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/runtime/samples/each-block-keyed-nested/Child.svelte
@@ -0,0 +1,5 @@
<script>
export let id;
</script>

{id}
16 changes: 16 additions & 0 deletions test/runtime/samples/each-block-keyed-nested/_config.js
@@ -0,0 +1,16 @@
export default {
html: `
1
`,

test({ assert, component, target }) {
component.desks = [
{
id: 1,
teams: [{ id: 2 }]
}
];

assert.htmlEqual(target.innerHTML, '2');
}
};
16 changes: 16 additions & 0 deletions test/runtime/samples/each-block-keyed-nested/main.svelte
@@ -0,0 +1,16 @@
<script>
import Child from './Child.svelte';
export let desks = [
{
id: 1,
teams: [{ id: 1 }]
}
];
</script>

{#each desks as desk (desk.id)}
{#each desk.teams as team (team.id)}
<Child id={team.id} />
{/each}
{/each}

0 comments on commit 65b28ed

Please sign in to comment.