freetrade-io / ts-firebase-driver-testing

Swap out Firebase as a driver for in-process testing
MIT License
11 stars 1 forks source link

Storing a dot-notated key for a firestore document should create a nested object #97

Open rorybainfreetrade opened 3 years ago

rorybainfreetrade commented 3 years ago

With firestore, when you set the following for an object:

firestore.doc(`foo`).set({
    'bar.thing': 3
})

You expect to get a document in Firestore with the following shape:

{
   bar: {
      thing: 3
   }
}

But currently the driver only stores the original dotted-string path to the original value. ('bar.thing': 3)

rorybainfreetrade commented 3 years ago

Nevermind, this has been implemented here: https://github.com/freetrade-io/ts-firebase-driver-testing/pull/80. We must be getting an out of date driver version somewhere!