Firebase Mock extends mockfirebase to provide support for Firebase 3.0.
Setup
Node
$ npm install firebase-mock
var MockFirebase = require('firebase-mock').MockFirebase;
AMD/Browser
$ bower install firebase-mock
<script src="./bower_components/firebase-mock/browser/firebasemock.js"></script>
API
Firebase Mock supports the normal Firebase API plus a small set of utility methods documented fully in the API Reference. Rather than make a server call that is actually asynchronous, MockFirebase allow you to either trigger callbacks synchronously or asynchronously with a specified delay (ref.flush
).
Tutorials
- Basic
- Authentication
- Simulating Errors
- Overriding
window.Firebase
- Overriding
require('firebase')
- Using Spies for Ordering