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/spread-element-boolean/_config.js

26 lines
392 B

export default {
props: {
props: {
disabled: true
}
},
html: `
<button disabled>click me</button>
`,
test({ assert, component, target }) {
const button = target.querySelector('button');
assert.ok(button.disabled);
component.props = { disabled: false };
assert.htmlEqual(
target.innerHTML,
'<button>click me</button>'
);
assert.ok(!button.disabled);
}
};