-
Notifications
You must be signed in to change notification settings - Fork 540
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
fix: fix restify instrumentation utils that might accept undefined types #690
fix: fix restify instrumentation utils that might accept undefined types #690
Conversation
071873b
to
12d2873
Compare
Codecov Report
@@ Coverage Diff @@
## main #690 +/- ##
==========================================
- Coverage 96.82% 96.62% -0.21%
==========================================
Files 9 16 +7
Lines 630 1036 +406
Branches 124 151 +27
==========================================
+ Hits 610 1001 +391
- Misses 20 35 +15
|
plugins/node/opentelemetry-instrumentation-restify/package.json
Outdated
Show resolved
Hide resolved
plugins/node/opentelemetry-instrumentation-restify/package.json
Outdated
Show resolved
Hide resolved
👍 Good catch. I don't see a reason to install and use Bluebird though for the tests. |
I added that because #690 (comment). I would incline towards not including non built-in promise. I think, by now, it should be the responsibility of the custom promise author to write it according to the promise a+ spec. It might be over-stretching to also test custom promise or popular promise implementation like bluebird/rsvp/etc. Regardless, advice me. I can modify this PR. |
Yeah. Really sorry to bounce you back and forth like that, but I don't think it's worth the extra dep. |
8f83e02
to
ec160ef
Compare
ec160ef
to
7925fab
Compare
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.
👍
Instead of bluebird or some other promise 3rd party you could write your own promise like object in a test. But I fine with removing bluebird. |
That makes sense, yes. The currently implemented version of the util is a bit more restrictive also checking for Let's leave it for now - the current PR is solving an issue it intended to. |
Which problem is this PR solving?
typeof undefined.then
.Short description of the changes