Skip to content

Commit a164cfc

Browse files
committed
test: fix errors for firestore
1 parent fd35693 commit a164cfc

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

__tests__/vuefire/firestore/index.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ describe('Firestore: firestore option', () => {
3535

3636
it('does nothing with no firestore', () => {
3737
const wrapper = mount({
38+
template: 'no',
3839
data: () => ({ items: null }),
3940
})
4041
expect(wrapper.vm.items).toEqual(null)
@@ -44,6 +45,7 @@ describe('Firestore: firestore option', () => {
4445
const spy = jest.fn()
4546
mount(
4647
{
48+
template: 'no',
4749
// @ts-ignore: only care about not crashing
4850
firestore: () => {},
4951
data: () => ({ items: null }),

__tests__/vuefire/firestore/merging.spec.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,17 @@ describe.skip('Firestore: option merging', () => {
4646
}
4747

4848
function factory(options: any) {
49-
return mount(options, {
50-
global: {
51-
plugins: [firestorePlugin],
49+
return mount(
50+
{
51+
template: 'no',
52+
...options,
5253
},
53-
})
54+
{
55+
global: {
56+
plugins: [firestorePlugin],
57+
},
58+
}
59+
)
5460
}
5561

5662
it('should merge properties', () => {
@@ -67,7 +73,7 @@ describe.skip('Firestore: option merging', () => {
6773

6874
it('supports function syntax', () => {
6975
const { mWithFn } = createMixins()
70-
const { vm } = factory({ mixins: [mWithObjA, mWithObjB] })
76+
const { vm } = factory({ mixins: [mWithFn] })
7177
expect(vm.$firestoreRefs).toEqual({
7278
a: db.collection(5),
7379
c: db.collection(6),
@@ -76,7 +82,7 @@ describe.skip('Firestore: option merging', () => {
7682

7783
it('should merge two functions', () => {
7884
const { mWithFn, mWithObjA, mWithObjB } = createMixins()
79-
const { vm } = factory({ mixins: [mWithObjA, mWithObjB] })
85+
const { vm } = factory({ mixins: [mWithObjA, mWithObjB, mWithFn] })
8086
expect(vm.$firestoreRefs).toEqual({
8187
a: db.collection(5),
8288
b: db.collection(2),

0 commit comments

Comments
 (0)