Skip to content

Instantly share code, notes, and snippets.

@sbatson5
Created November 4, 2019 16:56
Show Gist options
  • Save sbatson5/398f50ed62dc016290b5ea6dc95765d0 to your computer and use it in GitHub Desktop.
Save sbatson5/398f50ed62dc016290b5ea6dc95765d0 to your computer and use it in GitHub Desktop.
mockFirebase example
const { mockFirebase } = require('firestore-jest-mock');
mockFirebase({
database: {
users: [
{ id: 'abc123', first: 'Bob', last: 'builder', born: 1998 },
{ id: '123abc', first: 'Blues', last: 'builder', born: 1996 }
],
cities: [
{ id: 'LA', name: 'Los Angeles', state: 'CA', country: 'USA' },
{ id: 'DC', name: 'Disctric of Columbia', state: 'DC', country: 'USA' }
]
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment