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-each-block-outro/_config.js

19 lines
410 B

export default {
data: {
things: [ 'a', 'b', 'c' ]
},
test ( assert, component, target, window, raf ) {
const divs = target.querySelectorAll( 'div' );
component.set({ things: [ 'a' ] });
raf.tick( 50 );
assert.equal( divs[0].foo, undefined );
assert.equal( divs[1].foo, 0.5 );
assert.equal( divs[2].foo, 0.5 );
raf.tick( 100 );
assert.htmlEqual(target.innerHTML, '<div>a</div>');
}
};