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-abort/_config.js

32 lines
552 B

// expect aborting halfway through outro transition
// to behave the same in `{#if}` block as in `{:else}` block
export default {
html: `
<div>a</div>
<div>a</div>
`,
async test({ assert, component, target, window, raf }) {
component.visible = false;
// abort halfway through the outro transition
raf.tick(50);
await component.$set({
visible: true,
array: ['a', 'b', 'c']
});
assert.htmlEqual(target.innerHTML, `
<div>a</div>
<div>b</div>
<div>c</div>
<div>a</div>
<div>b</div>
<div>c</div>
`);
}
};