fix missing code fixes from update after PR review.
Signed-off-by: headphonejames <generalfuzz@gmail.com>
This commit is contained in:
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -30,6 +30,7 @@ describe('OAuthRequestManager', () => {
|
||||
icon: () => null,
|
||||
},
|
||||
onAuthRequest: async () => 'hello',
|
||||
authFlow: 'popup',
|
||||
});
|
||||
|
||||
expect(reqSpy).toHaveBeenCalledTimes(0);
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export {
|
||||
ensuresXRequestedWith,
|
||||
postMessageResponse,
|
||||
redirectMessageResponse,
|
||||
} from './authFlowHelpers';
|
||||
export { ensuresXRequestedWith, postMessageResponse } from './authFlowHelpers';
|
||||
|
||||
export type { WebMessageResponse } from './types';
|
||||
|
||||
Reference in New Issue
Block a user