-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dns): remove lookupPromise polyfill for node8 dns promise tests (#…
…1223) * fix(dns): remove lookupPromise polyfill for node8 dns promise tests The `lookupPromise` function emulates a Promise based dns.lookup by creating its own Promise() object, and then calling the async callback version of `dns.lookup()` inside it. While this does make the tests work under Node 8, it is not at all what these tests were originally intended to test. That is, all of the functions in this file were testing the polyfill in this test file, and *not* testing the promise based version of dns.lookup() that was introduced in Node 10.6.0. Tellingly, the tests in this code never exercise the patch code in instrumentation.ts that handles the non-callback (i.e. Promise-based) version of the lookup() function. This change removes the irrelevant test function and instead reverts to directly calling dns.promises.lookup() as existed in this code prior to the "cleanup" in PR# 110 that nominally was "Setting up ESLint". * chore(lint): eliminate unused type parameter in dns instrumentation Co-authored-by: Rauno Viskus <Rauno56@users.noreply.github.com>
- Loading branch information
1 parent
180b336
commit 2777a79
Showing
2 changed files
with
9 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters