another test

pull/2161/head
Conduitry 6 years ago
parent 957093e81a
commit f5290b2958

@ -0,0 +1,11 @@
export default {
test({ assert, component }) {
assert.deepEqual(component.foo, {});
component.bar = 'hello';
assert.deepEqual(component.foo, { hello: true });
component.bar = 'world';
assert.deepEqual(component.foo, { hello: true, world: true });
component.bar = false;
assert.deepEqual(component.foo, { hello: true, world: true });
}
};

@ -0,0 +1,7 @@
<script>
export let foo = {};
export let bar;
$: if (bar) {
foo[bar] = true;
}
</script>
Loading…
Cancel
Save