-
Notifications
You must be signed in to change notification settings - Fork 116
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
Quick Param Updates #641
Quick Param Updates #641
Conversation
Codecov Report
@@ Coverage Diff @@
## master #641 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 104 104
Lines 1528 1528
Branches 261 261
=====================================
Hits 1528 1528
Continue to review full report at Codecov.
|
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.
rock n roll! 🎸
thanks for jumping in on this one @mpayson!
geocode({ | ||
params: { | ||
singleLine: "LAX", | ||
countryCode: "USA", | ||
outFields: ["Addr_type", "Score"] | ||
} | ||
}) |
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.
the params object is a catch all that allows anyone to pass any parameter they want. for a test like this its more helpful to exercise the curated list and confirm we are indeed also passing through 'first class citizen' parameters appropriately.
geocode({
singleLine: "LAX",
countryCode: "USA",
outFields: ["Addr_type", "Score"]
})
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.
added another test for named parameters
const outFieldsEncoded = encodeURIComponent( | ||
["Addr_type", "Score"].join(",") | ||
); | ||
expect(options.body).toContain(`outFields=${outFieldsEncoded}`); |
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.
very nice. 🍨
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 @mpayson!
This is in v2.7.0 |
For #628 & #626