Skip to content

Commit e6716e1

Browse files
committed
test: enusre _firestoreUnbinds
1 parent 4804381 commit e6716e1

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

test/index.spec.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,23 @@ test.beforeEach(async t => {
3636

3737
test('does nothing with no firestore', t => {
3838
const vm = new Vue({
39-
render (h) {
40-
return h('p', 'eh')
41-
},
39+
render: h => ('p', 'foo'),
4240
data: () => ({ items: null }),
4341
})
4442
t.deepEqual(vm.items, null)
4543
})
44+
45+
test('setups _firestoreUnbinds', t => {
46+
const vm = t.context.vm
47+
t.truthy(vm._firestoreUnbinds)
48+
t.deepEqual(Object.keys(vm._firestoreUnbinds).sort(), ['item', 'items'])
49+
})
50+
51+
test('setups _firestoreUnbinds with no firestore options', t => {
52+
const vm = new Vue({
53+
render: h => ('p', 'foo'),
54+
data: () => ({ items: null }),
55+
})
56+
t.truthy(vm._firestoreUnbinds)
57+
t.deepEqual(Object.keys(vm._firestoreUnbinds), [])
58+
})

0 commit comments

Comments
 (0)