export default {
props: {
component: {
name: 'world'
}
},
html: `
Hello world!
`,
ssrHtml: `
Hello world!
`,
async test({ assert, component, target, window }) {
const input = target.querySelector('input');
assert.equal(input.value, 'world');
const event = new window.Event('input');
input.value = 'everybody';
await input.dispatchEvent(event);
assert.equal(input.value, 'everybody');
assert.htmlEqual(
target.innerHTML,
`
Hello everybody!
`
);
component.component = { name: 'goodbye' };
assert.equal(input.value, 'goodbye');
assert.htmlEqual(
target.innerHTML,
`
Hello goodbye!
`
);
}
};