Skip to content

firebase-admin 6.x.x compatibility #37

@kylehotchkiss

Description

@kylehotchkiss

Version info

firebase-functions-test: 0.1.6

firebase-functions: 2.1.0

firebase-admin: 6.4.0

Test case

With the above package versions, run this:

      const test = require('firebase-functions-test')();

      const snapshot = test.firestore.makeDocumentSnapshot({
        fields: {
          email_address: 'test@test.com'
        }
      }, 'signups/testing-id');

Steps to reproduce

Run above

Expected behavior

Firestore document snapshot created

Actual behavior

    TypeError: firestoreService.snapshot_ is not a function

      16 | 
    > 17 |       const snapshot = test.firestore.makeDocumentSnapshot({
      18 |         fields: {
      19 |           email_address: 'test@test.com'
      20 |         }
      
      at Object.makeDocumentSnapshot (node_modules/firebase-functions-test/lib/providers/firestore.js:55:29)
      at Object.<anonymous> (test/signups-pipeline.spec.js:17:39)

Comments

Another user's Stack Overflow report of same bug: https://stackoverflow.com/questions/53723486/typeerror-firestoreservice-snapshot-is-not-a-function

My guess is maybe firebase-admin version 6.x.x is causing it?

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions