How to use the @posva/vuefire-test-helpers.Vue function in @posva/vuefire-test-helpers

To help you get started, we’ve selected a few @posva/vuefire-test-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vuejs / vuefire / packages / vuefire / __tests__ / rtdb / bind.spec.ts View on Github external
async function createVm() {
    const source = new MockFirebase().child('data')
    const vm = new Vue({
      // purposely set items as null
      // but it's a good practice to set it to an empty array
      data: () => ({
        items: [],
        item: null,
      }),
    })
    await tick()

    return { vm, source }
  }
github vuejs / vuefire / packages / vuefire / __tests__ / firestore / bind.spec.ts View on Github external
beforeEach(async () => {
    // @ts-ignore
    collection = db.collection()
    // @ts-ignore
    document = db.collection().doc()
    // @ts-ignore
    vm = new Vue({
      // purposely set items as null
      // but it's a good practice to set it to an empty array
      data: () => ({
        items: null,
        item: null,
      }),
    })
    await tick()
  })