assaf / node-replay

When API testing slows you down: record and replay HTTP responses like a boss
http://documentup.com/assaf/node-replay
MIT License
522 stars 107 forks source link

Support |all| option when shimming DNS.lookup #177

Closed jeremy-w closed 3 years ago

jeremy-w commented 3 years ago

Before, clients attempting an "all" style address lookup, such as the SQL Server database module tedious does in its connector.js when provided a hostname, were liable to error out due to treating the argument as an array when Replay was supplying a string. This might have looked like:

TypeError: this.addresses.shift is not a function

Now, when the |all| option is detected, the string is wrapped in an array to match client expectations.