export default {
compileOptions: {
dev: true
},
get props() {
return { componentName: 'Sub' };
},
html: '
Sub
',
test({ assert, component, target }) {
component.componentName = 'Proxy';
assert.htmlEqual(target.innerHTML, 'Sub
');
try {
component.componentName = 'banana';
throw new Error('Expected an error');
} catch (err) {
assert.equal(
err.message,
'this={...} of should specify a Svelte component.'
);
}
}
};