mirror of https://github.com/sveltejs/svelte
20 lines
526 B
20 lines
526 B
8 years ago
|
export default {
|
||
|
data: {
|
||
|
bar: 'lol',
|
||
|
x: 2,
|
||
8 years ago
|
compound: 'piece of',
|
||
|
go: { deeper: 'core' }
|
||
8 years ago
|
},
|
||
8 years ago
|
html: `<div><p>foo: lol</p>\n<p>baz: 42 (number)</p>\n<p>qux: this is a piece of string</p>\n<p>quux: core</p></div>`,
|
||
8 years ago
|
test ( assert, component, target ) {
|
||
8 years ago
|
component.set({
|
||
|
bar: 'wut',
|
||
|
x: 3,
|
||
8 years ago
|
compound: 'rather boring',
|
||
|
go: { deeper: 'heart' }
|
||
8 years ago
|
});
|
||
|
|
||
8 years ago
|
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>\n<p>quux: heart</p></div>` );
|
||
8 years ago
|
}
|
||
|
};
|