mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
350 B
26 lines
350 B
6 years ago
|
export default {
|
||
|
props: {
|
||
|
tree: [
|
||
|
{id: 1, sub: null},
|
||
|
{id: 2, sub: [{id: 11}]}
|
||
|
]
|
||
|
},
|
||
|
|
||
|
html: `
|
||
|
<div>1</div>
|
||
|
<div>2\n<div>11</div></div>
|
||
|
`,
|
||
|
|
||
|
test({ assert, component, target }) {
|
||
|
component.tree = [
|
||
|
{id: 1, sub: null},
|
||
|
{id: 2, sub: null}
|
||
|
];
|
||
|
|
||
|
assert.htmlEqual(target.innerHTML, `
|
||
|
<div>1</div>
|
||
|
<div>2</div>
|
||
|
`);
|
||
|
}
|
||
|
};
|