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/compiler/component-data-dynamic/_config.js

20 lines
460 B

import * as assert from 'assert';
export default {
data: {
bar: 'lol',
x: 2,
compound: 'piece of'
},
html: `<div><p>foo: lol</p>\n<p>baz: 42 (number)</p>\n<p>qux: this is a piece of string</p></div>`,
test ( component, target ) {
component.set({
bar: 'wut',
x: 3,
compound: 'rather boring'
});
assert.equal( target.innerHTML, `<div><p>foo: wut</p>\n<p>baz: 43 (number)</p>\n<p>qux: this is a rather boring string</p></div>` );
}
};