mirror of https://github.com/sveltejs/svelte
Merge pull request #76 from guzart/return-state-wihout-key
return state when using get without keypull/83/head
commit
b3acc6d9e6
@ -0,0 +1,7 @@
|
||||
export default {
|
||||
test ( assert, component ) {
|
||||
assert.equal( component.get('a'), 1 );
|
||||
assert.equal( component.get('c'), 3 );
|
||||
assert.deepEqual( component.get(), { a: 1, b: 2, c: 3 });
|
||||
}
|
||||
};
|
@ -0,0 +1,12 @@
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({
|
||||
a: 1,
|
||||
b: 2
|
||||
}),
|
||||
|
||||
computed: {
|
||||
c: ( a, b ) => a + b,
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue