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/attribute-dynamic-type/_config.js

19 lines
381 B

export default {
props: {
inputType: 'text',
inputValue: 42
},
html: '<input type="text">',
ssrHtml: '<input type="text" value="42">',
test({ assert, component, target }) {
const input = target.querySelector('input');
assert.equal(input.type, 'text');
assert.equal(input.value, '42');
component.inputType = 'number';
assert.equal(input.type, 'number');
}
};