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

33 lines
492 B

export default {
props: {
show: false,
fields: [1, 2]
},
html: '<div></div>',
test({ assert, component, target }) {
component.show = true;
component.fields = [1, 2, 3];
assert.htmlEqual( target.innerHTML, `
<div>
<span>1</span>
<span>2</span>
<span>3</span>
</div>
` );
component.fields = [1, 2, 3, 4];
assert.htmlEqual( target.innerHTML, `
<div>
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
</div>
` );
}
};