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

16 lines
365 B

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