title: Mocha unit tests for Firebase app
body: <p>I use firebase 3.3.0 and I want to use <a href="https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signInWithEmailAndPassword">signInWithEmailAndPassword</a> function in my mocha unit test, but I get error <strong>auth/network-request-failed</strong></p>
  
  <pre><code>Unhandled rejection Error: A network error (such as timeout, interrupted connection or unreachable host) has occurred. 
  </code></pre>
  
  <p><strong>test.js</strong></p>
  
  <pre><code>const FIREBASE_CONFIG = {
      apiKey: "AIzaSyDdA1POUWy9eid1AdBYuMdxch_k8ob7Qrg",
      authDomain: "my-app.firebaseapp.com",
      databaseURL: "https://my-app.firebaseio.com",
      storageBucket: "my-app.appspot.com",
  };
  
  const FIREBASE_API_REF = firebase.initializeApp(FIREBASE_CONFIG);
  
  before(function (done) {
  
          promise = new Promise(function (resolve, reject) {
              return FIREBASE_API_REF.auth().signInWithEmailAndPassword(firstUserEmail, firstUserPassword)
              .then(function (userData) {
                  firstUserId = userData.uid;
                  resolve(userData);
                  done();
              }, function (error) {
                  return reject(error);
              })
          });
  
      });
  </code></pre>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>"scripts": {
      "test": "mocha --grep ./e2e.js --invert --compilers js:babel-register -R spec --ui bdd --timeout 7000"
    }
  </code></pre>