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

37 lines
539 B

export default {
nestedTransitions: true,
skipIntroByDefault: true,
data: {
x: true,
},
html: `
<div>a</div>
`,
test (assert, component, target, window, raf) {
component.set({ x: false });
assert.htmlEqual(target.innerHTML, `
<div>a</div>
<div>b</div>
`);
const [a, b] = target.querySelectorAll('div');
raf.tick(25);
assert.equal(a.a, 0.75);
assert.equal(b.b, 0.25);
raf.tick(100);
assert.equal(a.a, 0);
assert.equal(b.b, 1);
assert.htmlEqual(target.innerHTML, `
<div>b</div>
`);
}
};