Commit Graph

2 Commits

Author SHA1 Message Date
Ruben Bridgewater 13086d2fcd fix tests: remove unnecessary assert doesNotThrow and api calls (#1170)
* tests: fix error verification

So far the error message was not tested at all. This change makes
sure the error will actually be tested for.

* tests: remove unnecessary api calls

`assert.doesNotThrow` does not provide any benefit since it will
only catch errors and then rethrow in case of an error.
2018-04-09 19:36:52 -07:00
Martin Iwanowski 327b65cb6b Use node 7+ WHATWG parser for hostname, fixes #1002 (#1004)
* Use node 7+ WHATWG parser for hostname, fixes #1002

* only use URL if host is IPv6, expose parsed URL

* catch invalid URLs, memoize empty obj

* hostname returns empty string when URL throws
2017-06-20 09:57:30 -07:00