{"action":"opened","issue":{"url":"https://api.github.com/repos/soumak77/firebase-mock/issues/103","repository_url":"https://api.github.com/repos/soumak77/firebase-mock","labels_url":"https://api.github.com/repos/soumak77/firebase-mock/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/soumak77/firebase-mock/issues/103/comments","events_url":"https://api.github.com/repos/soumak77/firebase-mock/issues/103/events","html_url":"https://github.com/soumak77/firebase-mock/issues/103","id":349756463,"node_id":"MDU6SXNzdWUzNDk3NTY0NjM=","number":103,"title":"Question: How to define sub-collections of documents when defining MockFirestore?","user":{"login":"ilearnio","id":14331216,"node_id":"MDQ6VXNlcjE0MzMxMjE2","avatar_url":"https://avatars1.githubusercontent.com/u/14331216?v=4","gravatar_id":"","url":"https://api.github.com/users/ilearnio","html_url":"https://github.com/ilearnio","followers_url":"https://api.github.com/users/ilearnio/followers","following_url":"https://api.github.com/users/ilearnio/following{/other_user}","gists_url":"https://api.github.com/users/ilearnio/gists{/gist_id}","starred_url":"https://api.github.com/users/ilearnio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilearnio/subscriptions","organizations_url":"https://api.github.com/users/ilearnio/orgs","repos_url":"https://api.github.com/users/ilearnio/repos","events_url":"https://api.github.com/users/ilearnio/events{/privacy}","received_events_url":"https://api.github.com/users/ilearnio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-11T19:03:56Z","updated_at":"2018-08-11T19:03:56Z","closed_at":null,"author_association":"NONE","body":"Currently we define mocked DB documents like so:\r\n\r\n```ts\r\nconst db = new MockFirestore(null, {\r\n  collectionName: {\r\n    documentId: {\r\n      name: 'foo',\r\n      createdAt: new Date(0),\r\n    },\r\n    ...\r\n  }\r\n})\r\n```\r\n\r\nIs there any way to pass nested sub-collections? So it would look something like:\r\n\r\n```ts\r\nconst db = new MockFirestore(null, {\r\n  collectionName: {\r\n    documentId: {\r\n      name: 'foo',\r\n      createdAt: new Date(0),\r\n      \r\n      subCollections: { // <-- Need to do something like this\r\n        subCollectionName: {\r\n          documentId: {\r\n            ...\r\n          }\r\n        },\r\n        ...\r\n      }\r\n    }\r\n  }\r\n})\r\n```"}}
{"actor":{"display_login":"ilearnio"}}