How to use the ember-cloud-firestore-adapter/instance-initializers/cloud-firestore.initialize function in ember-cloud-firestore-adapter

To help you get started, we’ve selected a few ember-cloud-firestore-adapter 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 mikkopaderes / ember-cloud-firestore-adapter / addon-test-support / mocks / cloud-firestore.js View on Github external
export default function mockCloudFirestore(owner, fixtureData) {
  initializeInstanceInitializer(owner);

  const mockFirebase = new MockFirebase();

  const mockFirebasePojo = {
    _data: fixtureData,
    initializeApp: mockFirebase.initializeApp,
    firestore: mockFirebase.firestore,
  };
  const firebaseService = Service.extend(mockFirebasePojo);

  owner.register('service:firebase', firebaseService);

  return owner.lookup('service:firebase', { as: 'firebase' });
}