fix missing code fixes from update after PR review.

Signed-off-by: headphonejames <generalfuzz@gmail.com>
This commit is contained in:
headphonejames
2023-02-03 12:18:50 -08:00
parent ae4d826fb2
commit 167f457803
4 changed files with 10 additions and 5 deletions
@@ -25,12 +25,14 @@ describe('MockOAuthApi', () => {
const requester1 = mock.createAuthRequester({
provider: { icon: () => null, title: 'Test', id: 'test-provider' },
onAuthRequest: authHandler1,
authFlow: 'popup',
});
const authHandler2 = jest.fn().mockResolvedValue('other');
const requester2 = mock.createAuthRequester({
provider: { icon: () => null, title: 'Test', id: 'test-provider' },
onAuthRequest: authHandler2,
authFlow: 'popup',
});
const promises = [
@@ -68,12 +70,14 @@ describe('MockOAuthApi', () => {
const requester1 = mock.createAuthRequester({
provider: { icon: () => null, title: 'Test', id: 'test-provider' },
onAuthRequest: authHandler1,
authFlow: 'popup',
});
const authHandler2 = jest.fn();
const requester2 = mock.createAuthRequester({
provider: { icon: () => null, title: 'Test', id: 'test-provider' },
onAuthRequest: authHandler2,
authFlow: 'popup',
});
const promises = [
@@ -55,4 +55,8 @@ export default class MockOAuthApi implements OAuthRequestApi {
});
});
}
authFlow() {
return 'popup';
}
}
@@ -30,6 +30,7 @@ describe('OAuthRequestManager', () => {
icon: () => null,
},
onAuthRequest: async () => 'hello',
authFlow: 'popup',
});
expect(reqSpy).toHaveBeenCalledTimes(0);
+1 -5
View File
@@ -14,10 +14,6 @@
* limitations under the License.
*/
export {
ensuresXRequestedWith,
postMessageResponse,
redirectMessageResponse,
} from './authFlowHelpers';
export { ensuresXRequestedWith, postMessageResponse } from './authFlowHelpers';
export type { WebMessageResponse } from './types';