Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
85e25a9
commit 65b28ed
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script> | ||
export let id; | ||
</script> | ||
|
||
{id} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export default { | ||
html: ` | ||
1 | ||
`, | ||
|
||
test({ assert, component, target }) { | ||
component.desks = [ | ||
{ | ||
id: 1, | ||
teams: [{ id: 2 }] | ||
} | ||
]; | ||
|
||
assert.htmlEqual(target.innerHTML, '2'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} |