mirror of https://github.com/sveltejs/svelte
parent
cb9b00254b
commit
3ef3229075
@ -0,0 +1,14 @@
|
||||
import * as assert from 'assert';
|
||||
|
||||
export default {
|
||||
html: `<div style="color: red;">red</div>`,
|
||||
test ( component, target ) {
|
||||
const div = target.querySelector( 'div' );
|
||||
|
||||
assert.equal( div.style.color, 'red' );
|
||||
|
||||
component.set({ color: 'blue' });
|
||||
assert.equal( target.innerHTML, `<div style="color: blue;">blue</div>` );
|
||||
assert.equal( div.style.color, 'blue' );
|
||||
}
|
||||
};
|
@ -0,0 +1,9 @@
|
||||
<div style='color: {{color}};'>{{color}}</div>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({
|
||||
color: 'red'
|
||||
})
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue