I have a helper method to do this in https://github.com/pouchdb/pouchdb/pull/2032

    return ('host' in testUtils.params()) ? testUtils.params().host || 'http://127.0.0.1:2020';