Improves testing

Restores disabled tests and converts them to using a mocked https.request() instead of actually creating a server.