Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: make node process terminateable after calling app.delete() #1514

Open
klausbayrhammer opened this issue Feb 2, 2019 · 1 comment
Open

Comments

@klausbayrhammer
Copy link

[REQUIRED] Describe your environment

  • Operating System version: MacOS 10.13.6
  • Browser version: nodejs v8.11.2
  • Firebase SDK version: firebase@^5.8.0:
  • Firebase Product: auth

[REQUIRED] Describe the problem

This is related to #1487. When using firebase together with firebase-auth you need to call firebase.app().delete() and firebase.auth().signOut() so the node process can terminate properly (which is required if you e.g. use firebase with auth for tests in a CI environment).
This is not a bug per se, but I think it would be a nice feature if firebase.app().delete() would take care of cleaning up everything (or at least the things that prevent the node process from being terminated)

Steps to reproduce:

Relevant Code:

describe('', () => {
    let firebaseApp;

    before(async () => {
        firebaseApp = await firebase.initializeApp(config);
        return firebaseApp.auth().signInWithEmailAndPassword(mail, password);
    });

    after(() => {
        firebaseApp.auth().signOut(); // this is necessary so the process terminates
        firebaseApp.delete();
    });

    it('....', () => {
    });
});
@g-viet
Copy link

g-viet commented Feb 4, 2019

In my case, I just initialize firebaseApp once and reuse it many times without deleting firebaseApp.
Just using only firebaseApp.auth().signOut(); for terminating process.

In case firestore is used, we can implement firebaseApp .firestore().disableNetwork() inside after, afterEach blocks, and firebaseApp .firestore().enableNetwork() inside before, beforeEach blocks.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants