diff --git a/test/runtime/samples/inline-style-directive-remove-semicolon/_config.js b/test/runtime/samples/inline-style-directive-remove-semicolon/_config.js new file mode 100644 index 0000000000..2c9936acec --- /dev/null +++ b/test/runtime/samples/inline-style-directive-remove-semicolon/_config.js @@ -0,0 +1,25 @@ +export default { + props: { + fontWeight: 'bold;', + fontSize: 12 + }, + html: ` +
+ `, + + test({ assert, target, window, component }) { + const p = target.querySelector('p'); + let styles = window.getComputedStyle(p); + assert.equal(styles.color, 'red'); + assert.equal(styles.fontWeight, 'bold'); + assert.equal(styles.fontSize, '12px'); + + component.fontWeight = 'normal;'; + component.fontSize = '14'; + assert.htmlEqual(target.innerHTML, ''); + styles = window.getComputedStyle(p); + assert.equal(styles.color, 'red'); + assert.equal(styles.fontWeight, 'normal'); + assert.equal(styles.fontSize, '14px'); + } +}; diff --git a/test/runtime/samples/inline-style-directive-remove-semicolon/main.svelte b/test/runtime/samples/inline-style-directive-remove-semicolon/main.svelte new file mode 100644 index 0000000000..99d856bfd5 --- /dev/null +++ b/test/runtime/samples/inline-style-directive-remove-semicolon/main.svelte @@ -0,0 +1,6 @@ + + +