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

Extract test helper factory for http requests #46

Merged
merged 1 commit into from
Aug 18, 2020

Conversation

JoelQ
Copy link
Contributor

@JoelQ JoelQ commented Aug 18, 2020

🧰 What's being changed?

This allows us to build up full http request doubles, without having to
specify values we don't care about.

Note that if overriding the url property to add query parameters, you
should also set the query_params property as the factory method
doesn't do any logic to keep these two in sync.

🧪 Testing

This whole PR is all testing 😆

@JoelQ JoelQ force-pushed the jq-extract-test-helper branch from 7c7983b to 8bfda00 Compare August 18, 2020 18:45
This allows us to build up full http request doubles, without having to
specify values we don't care about.

Note that if overriding the `url` property to add query parameters, you
should also set the `query_params` property as the factory method
doesn't do any logic to keep these two in sync.
@JoelQ JoelQ force-pushed the jq-extract-test-helper branch from 528a392 to f6bf57b Compare August 18, 2020 19:51
@JoelQ JoelQ merged commit f6bf57b into master Aug 18, 2020
@JoelQ JoelQ deleted the jq-extract-test-helper branch August 18, 2020 19:57
djmango pushed a commit to djmango/metrics-sdks that referenced this pull request Sep 19, 2023
* Fix omit for nested objects

We’re using the dedicated lodash.omit package from npm to reduce our bundle size. But it looks like the smaller npm modules are out of date:
https://github.com/lodash/lodash/issues/4254
lodash/lodash#4193
lodash/lodash#4030

Can confirm this works when using the full [email protected]  module, and not the [email protected] module.
```
const omit = require('lodash.omit');
 omit({ a: { b: { c: 1 } } }, ['a.b.c'])
{ a: { b: { c: 1 } } }
 const omit = require('lodash/omit');
 omit({ a: { b: { c: 1 } } }, ['a.b.c'])
{ a: { b: {} } }
```

* Remove individual lodash packages and include entire lodash library.

* Add test for blacklisting/whitelisting nested properties in response
@erunion erunion added ruby Issues related to our Ruby SDK and removed area:ruby labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Issues related to our Ruby SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants