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/runtime/samples/inline-style-directive-mult.../_config.js

28 lines
716 B

export default {
html: `
<p style="color: red; width: 65px; font-weight: 700;"></p>
`,
test({ assert, component, target, window }) {
const p = target.querySelector('p');
let styles = window.getComputedStyle(p);
assert.equal(styles.color, 'red');
component.myColor = 'pink';
component.width = '100vh';
component.absolute = true;
component.bold = false;
styles = window.getComputedStyle(p);
assert.htmlEqual(
target.innerHTML,
'<p style="color: pink; width: 100vh; font-weight: 100; position: absolute;"></p>'
);
assert.equal(styles.color, 'pink');
assert.equal(styles.width, '100vh');
assert.equal(styles.fontWeight, '100');
assert.equal(styles.position, 'absolute');
}
};