mirror of https://github.com/sveltejs/svelte
parent
0d10d6cc2d
commit
51a3972ad5
@ -0,0 +1,16 @@
|
||||
export default {
|
||||
data: {
|
||||
"is-active": true,
|
||||
isSelected: true,
|
||||
myClass: 'one two'
|
||||
},
|
||||
html: `<div class="one two is-active isSelected"></div>`,
|
||||
|
||||
test ( assert, component, target, window ) {
|
||||
component.set({ "is-active": false });
|
||||
|
||||
assert.htmlEqual( target.innerHTML, `
|
||||
<div class="one two isSelected"></div>
|
||||
` );
|
||||
}
|
||||
};
|
@ -0,0 +1 @@
|
||||
<div class="{ myClass }" class:is-active class:isSelected class:not-used></div>
|
@ -1,16 +1,15 @@
|
||||
export default {
|
||||
data: {
|
||||
"is-active": true,
|
||||
isSelected: true,
|
||||
myClass: 'one two'
|
||||
isSelected: true
|
||||
},
|
||||
html: `<div class="one two is-active isSelected"></div>`,
|
||||
html: `<div class="is-active isSelected"></div>`,
|
||||
|
||||
test ( assert, component, target, window ) {
|
||||
component.set({ "is-active": false });
|
||||
|
||||
assert.htmlEqual( target.innerHTML, `
|
||||
<div class="one two isSelected"></div>
|
||||
<div class="isSelected"></div>
|
||||
` );
|
||||
}
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
<div class="{ myClass }" class:is-active class:isSelected class:not-used></div>
|
||||
<div class:is-active class:isSelected class:not-used></div>
|
||||
|
Loading…
Reference in new issue