svelte/test/runtime/samples/hello-world/_config.js

16 lines
301 B

export default {
data: {
name: 'world'
},
html: '<h1>Hello world!</h1>',
test ( assert, component, target ) {
component.set({ name: 'everybody' });
assert.htmlEqual( target.innerHTML, '<h1>Hello everybody!</h1>' );
component.destroy();
assert.htmlEqual( target.innerHTML, '' );
}
};