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

33 lines
436 B

export default {
props: {
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, '');
}
};