From 08cfd6998f70e69d489ddf53b9f39755ef2ed87b Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Tue, 27 Oct 2020 22:10:58 -0700 Subject: [PATCH] test: pass all strategy options to auth `factory` --- test/index.test.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/index.test.ts b/test/index.test.ts index 76fa96a25..1011457df 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1902,6 +1902,8 @@ test("factory auth option", async () => { const appAuth = createAppAuth({ appId: APP_ID, privateKey: PRIVATE_KEY, + extra1: "value1", + extra2: "value2", }); const factory = jest.fn().mockReturnValue({ ok: true }); @@ -1909,6 +1911,7 @@ test("factory auth option", async () => { const customAuth = await appAuth({ type: "installation", installationId: 123, + extra1: "auth overide", factory, }); @@ -1918,13 +1921,12 @@ test("factory auth option", async () => { expect(Object.keys(factoryOptions).sort()).toStrictEqual([ "appId", "cache", - "clientId", - "clientSecret", + "extra1", + "extra2", "installationId", "log", "privateKey", "request", - "timeDifference", ]); expect(factoryOptions).toEqual( @@ -1932,6 +1934,8 @@ test("factory auth option", async () => { appId: APP_ID, privateKey: PRIVATE_KEY, installationId: 123, + extra1: "auth overide", + extra2: "value2", }) ); });