node package manager

karma-firebase-server

karma-firebase-server

A karma plugin which runs firebase-server.

CircleCI
Codacy Badge ## Usage To install, run

npm i --save-dev karma-firebase-server

Then, you can start/close firebase-server from test script by accessing to karma server. For example,

import server from "karma-firebase-server";
import firebase from "firebase";
describe(function() {
    let port;
    before(function() {
        server.start(res => {
            port = res.text;
        });
    });
    it(function() {
        firebase.initializeApp({
            databaseURL: "ws://127.0.1:" + port
        });
    });
    after(function() {
        server.close(port, function() { });
    });
});