-
Notifications
You must be signed in to change notification settings - Fork 949
Increase unit test coverage for saml.ts to 100% #9131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Size Report 1Affected ProductsNo changes between base commit (3d44792) and merge commit (663799c).Test Logs |
Size Analysis Report 1Affected ProductsNo changes between base commit (3d44792) and merge commit (663799c).Test Logs |
|
||
it('credentialFromJSON returns SAML credential from valid object', () => { | ||
const json = { | ||
providerId: 'saml.provider', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible providerId and signInMethod are different? maybe we should use a different string for assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Liubin,
We have a validation in the SamlAuthCredential.fromJson method to validate that providerId === signInMethod
- https://github.com/firebase/firebase-js-sdk/blob/main/packages/auth/src/core/credentials/saml.ts#L95
Hence using the same string.
Discussion
Testing