[Test] Add test for class with spread attributes

pull/3236/head
Umang Galaiya 6 years ago
parent 52de08b1e0
commit c3bcee8b70

@ -0,0 +1,22 @@
export default {
data: {
myClass: 'one two',
attributes: {
role: 'button'
}
},
html: `<div class="one two" role="button"></div>`,
test ( assert, component, target, window ) {
component.set({
attributes: {
'aria-label': 'Test'
},
myClass: 'one'
});
assert.htmlEqual( target.innerHTML, `
<div class="one" aria-label="Test"></div>
` );
}
};

@ -0,0 +1 @@
<div class="{ myClass }" {...attributes}></div>
Loading…
Cancel
Save