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.
svelte/test/runtime/samples/transition-js-nested-each-d.../_config.js

32 lines
451 B

export default {
get props() {
return { visible: true, things: ['a', 'b', 'c'] };
},
test({ assert, component, target, raf }) {
assert.htmlEqual(
target.innerHTML,
`
<div>a</div>
<div>b</div>
<div>c</div>
`
);
component.things = ['a'];
raf.tick(100);
assert.htmlEqual(
target.innerHTML,
`
<div>a</div>
`
);
component.visible = false;
raf.tick(200);
assert.htmlEqual(target.innerHTML, '');
}
};