-
Notifications
You must be signed in to change notification settings - Fork 218
Pass the raw Express request to CallableContext #269
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
Pass the raw Express request to CallableContext #269
Conversation
laurenzlong
left a comment
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.
Thanks so much! Just some minor comments on the test.
spec/providers/https.spec.ts
Outdated
| }); | ||
| }); | ||
|
|
||
| it('should handle raw request', async () => { |
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.
rephrase to: "should expose raw request"
spec/providers/https.spec.ts
Outdated
| httpRequest: mockRequest, | ||
| expectedData: null, | ||
| callableFunction: (data, context) => { | ||
| expect(context.auth).to.be.undefined; |
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.
This line can be removed, distracts from seeing what the point of the test is.
spec/providers/https.spec.ts
Outdated
| expectedData: null, | ||
| callableFunction: (data, context) => { | ||
| expect(context.auth).to.be.undefined; | ||
| expect(context.instanceIdToken).to.be.undefined; |
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.
Same here, this line can be removed.
e0d8d55 to
e03ccc2
Compare
|
Thanks for the review. Your suggestions have been applied. |
|
Looks great! Thanks again for taking the time to do this! |
This PR generalizes what was originally proposed in #262.
Here is a summary of the spec shared by laurenzlong: