mirror of https://github.com/sveltejs/svelte
parent
ba5c3ce574
commit
d92fb12086
@ -0,0 +1,8 @@
|
|||||||
|
export default {
|
||||||
|
test({ assert, component, target }) {
|
||||||
|
assert.equal(component.qux, 2);
|
||||||
|
|
||||||
|
component.foo = 2;
|
||||||
|
assert.equal(component.qux, 4);
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,12 @@
|
|||||||
|
<script>
|
||||||
|
export let foo = 1, bar, baz, qux;
|
||||||
|
|
||||||
|
$: {
|
||||||
|
bar = foo;
|
||||||
|
baz = foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
$: {
|
||||||
|
qux = bar + baz;
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in new issue