Ninety-nine Pitchers of Malt
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

karma-firebase-server

0.1.1 • Public • Published

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() { });
    });
});

install

npm i karma-firebase-server

Downloadsweekly downloads

66

version

0.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability