mirror of https://github.com/sveltejs/svelte
handle undefined input value with spread (#5291)
parent
8adb47401e
commit
c752ed3527
@ -0,0 +1,12 @@
|
|||||||
|
export default {
|
||||||
|
async test({ assert, component, target, window }) {
|
||||||
|
const input = target.querySelector("input");
|
||||||
|
component.value = undefined;
|
||||||
|
|
||||||
|
assert.equal(input.value, "undefined");
|
||||||
|
|
||||||
|
component.value = "foobar";
|
||||||
|
|
||||||
|
assert.equal(input.value, "foobar");
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,5 @@
|
|||||||
|
<script>
|
||||||
|
export let value = '';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<input {value} {...{}} />
|
Loading…
Reference in new issue