We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7667fe5 commit 6511f35Copy full SHA for 6511f35
test/unbind.spec.js
@@ -46,3 +46,15 @@ test('manually unbinds a collection', async t => {
46
await t.context.collection.add({ text: 'foo' })
47
t.deepEqual(vm.items, [])
48
})
49
+
50
+test('manually unbinds a document', async t => {
51
+ const vm = t.context.vm
52
+ const spy = sinon.spy(vm._firestoreUnbinds, 'item')
53
+ vm.$unbind('item')
54
+ t.is(spy.callCount, 1)
55
+ t.deepEqual(Object.keys(vm._firestoreUnbinds), ['items'])
56
+ t.deepEqual(Object.keys(vm.$firestoreRefs), ['items'])
57
+ t.deepEqual(vm.item, null)
58
+ await t.context.document.update({ foo: 'foo' })
59
60
+})
0 commit comments