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

23 lines
540 B

export default {
props: {
objectsArray: [
{ 'foo-bar': 'FooBar', 0: 'zero', prop: 'prop' },
{ 'foo-bar': 'foobar', 0: 'null', prop: 'a prop' },
{ 'foo-bar': 'FOO BAR', 0: 'nada', prop: 'the prop' }
]
},
html: `
<p>FooBar: prop zero</p>
<p>foobar: a prop null</p>
<p>FOO BAR: the prop nada</p>
`,
test({ assert, component, target }) {
component.objectsArray = [{ 'foo-bar': 'Fool Ball', 0: 'nil', prop: 'one prop' }];
assert.htmlEqual( target.innerHTML, `
<p>Fool Ball: one prop nil</p>
`);
}
};