Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
Added test case for signInUserWithGithub to check if adding 'repo gist'
Andrew Bastineeb1ecd2df8b
diff --git a/helpers/__tests__/fb.spec.js b/helpers/__tests__/fb.spec.jsindex d9b2a824b..5d864eea5 100644--- a/helpers/__tests__/fb.spec.js+++ b/helpers/__tests__/fb.spec.js@@ -252,6 +252,26 @@ describe("FirebaseInstance", () => {await expect(fb.signInUserWithGithub()).rejects.toEqual("test error")})+ test("adds 'repo gist' scope", async () => {+ const fbFunc = jest.spyOn(mockAuth, "signInWithPopup")++ const addScopeMock = jest.fn()++ const fb = new FirebaseInstance(mocksdk, {+ github: () => {+ return {+ addScope: addScopeMock+ }+ },+ })++ signOutUser()++ fbFunc.mockImplementation(() => Promise.resolve("test"))+ await fb.signInUserWithGithub()++ expect(addScopeMock).toBeCalledWith("repo gist")+ })test("resolves the response the firebase request resolves", async () => {const fbFunc = jest.spyOn(mockAuth, "signInWithPopup")