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.
30 lines
500 B
30 lines
500 B
6 years ago
|
export default {
|
||
|
nestedTransitions: true,
|
||
|
skipIntroByDefault: true,
|
||
|
|
||
|
data: {
|
||
|
visible: true,
|
||
|
things: [ 'a', 'b', 'c' ]
|
||
|
},
|
||
|
|
||
|
test ( assert, component, target, window, raf ) {
|
||
|
assert.htmlEqual(target.innerHTML, `
|
||
|
<div>a</div>
|
||
|
<div>b</div>
|
||
|
<div>c</div>
|
||
|
`);
|
||
|
|
||
|
component.set({ things: [ 'a' ] });
|
||
|
|
||
|
raf.tick( 100 );
|
||
|
assert.htmlEqual(target.innerHTML, `
|
||
|
<div>a</div>
|
||
|
`);
|
||
|
|
||
|
component.set({ visible: false });
|
||
|
|
||
|
raf.tick( 200 );
|
||
|
assert.htmlEqual(target.innerHTML, '');
|
||
|
}
|
||
|
};
|