mirror of https://github.com/sveltejs/svelte
parent
978a2bcae7
commit
c523fc74aa
@ -0,0 +1 @@
|
||||
<div></div>
|
@ -0,0 +1,15 @@
|
||||
export default {
|
||||
test ( assert, component ) {
|
||||
const foo = component.refs.foo;
|
||||
let count = 0;
|
||||
|
||||
foo.observe( 'x', () => {
|
||||
count += 1;
|
||||
});
|
||||
|
||||
assert.equal( count, 1 );
|
||||
|
||||
component.set({ y: {} });
|
||||
assert.equal( count, 1 );
|
||||
}
|
||||
};
|
@ -0,0 +1,14 @@
|
||||
<Foo ref:foo x='{{x}}'/>
|
||||
|
||||
<script>
|
||||
import Foo from './Foo.html';
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
x: {},
|
||||
y: {}
|
||||
}),
|
||||
|
||||
components: { Foo }
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue