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/runtime/samples/component-not-constructor2-dev/_config.js

23 lines
493 B

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