We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6511f35 commit 40aa4c9Copy full SHA for 40aa4c9
test/bind.spec.js
@@ -39,3 +39,13 @@ test('manually binds a collection', async t => {
39
await collection.add({ text: 'foo' })
40
t.deepEqual(vm.items, [{ text: 'foo' }])
41
})
42
+
43
+test('manually binds a document', async t => {
44
+ const vm = t.context.vm
45
+ const document = t.context.document
46
+ t.deepEqual(vm.item, null)
47
+ await vm.$bind('item', document)
48
49
+ await document.update({ text: 'foo' })
50
+ t.deepEqual(vm.item, { text: 'foo' })
51
+})
0 commit comments