mirror of https://github.com/sveltejs/svelte
parent
ac6b87a762
commit
52de08b1e0
@ -0,0 +1,22 @@
|
|||||||
|
export default {
|
||||||
|
data: {
|
||||||
|
myClass: 'one two',
|
||||||
|
attributes: {
|
||||||
|
role: 'button'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
html: `<div class="one two three" role="button"></div>`,
|
||||||
|
|
||||||
|
test ( assert, component, target, window ) {
|
||||||
|
component.set({
|
||||||
|
attributes: {
|
||||||
|
'aria-label': 'Test'
|
||||||
|
},
|
||||||
|
myClass: 'one'
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.htmlEqual( target.innerHTML, `
|
||||||
|
<div class="one three" aria-label="Test"></div>
|
||||||
|
` );
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
<div class="{ myClass }" class:three="true" {...attributes}></div>
|
Loading…
Reference in new issue