Nanometer Process Machine
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    karma-firebase-serverpublic

    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

    17

    version

    0.1.1

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar