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

15 lines
377 B

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' );
}
};