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

20 lines
463 B

export default {
compileOptions: {
dev: true
},
props: {
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.');
}
}
};