From 7cb469657d9d678125ed8d031a4535d05cbe8bb7 Mon Sep 17 00:00:00 2001 From: gianantoniopini <63844628+gianantoniopini@users.noreply.github.com> Date: Tue, 18 May 2021 13:57:34 +0200 Subject: [PATCH] Firebase.auth Jest mock: minor fix in signOut() method --- __mocks__/gatsby-plugin-firebase/auth/auth.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/__mocks__/gatsby-plugin-firebase/auth/auth.js b/__mocks__/gatsby-plugin-firebase/auth/auth.js index 017dfbbc..1dc0db67 100644 --- a/__mocks__/gatsby-plugin-firebase/auth/auth.js +++ b/__mocks__/gatsby-plugin-firebase/auth/auth.js @@ -77,6 +77,8 @@ class Auth { this._currentUser = null; await delay(Constants.defaultDelayInMilliseconds); + + this.onAuthStateChangedObservers.forEach((observer) => observer(null)); } }