Skip to content
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

Add offline unit testing. #5

Merged
merged 2 commits into from
Oct 5, 2019
Merged

Add offline unit testing. #5

merged 2 commits into from
Oct 5, 2019

Conversation

mblonyox
Copy link

@mblonyox mblonyox commented Oct 3, 2019

Because the app route registered before the parser, the req.body is undefined.
If you upgrade the express to version 4.16 or above, the body-parses is bundled into express itself.

Hope you could merge this.

@mblonyox mblonyox changed the title Fix: bodyParser should be registered before router Add offline unit testing. Oct 3, 2019
@mblonyox
Copy link
Author

mblonyox commented Oct 3, 2019

I've added offline unit testing for firebase HttpsFunction webApi related to Issue #3

@@ -13,19 +13,25 @@
"dependencies": {
"body-parser": "^1.19.0",
"express": "^4.14.1",
"firebase-admin": "~7.0.0",
"firebase-admin": "^6.5.1",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the firebase-admin dependency in firebase-functions-helper is still in 6.5.1, downgrade to package to the same version solved the namespace problem.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mblonyox

@dalenguyen dalenguyen merged commit bb37341 into dalenguyen:master Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants