Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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' });
}