function validate(id, driver) {
  if (!driver.id) {
    throw new Error(`${id} must export a unique id`);
  }

  if (id !== driver.id) {
    throw new Error(`${id} does not match driver id ${driver.id}`);
  }

  if (!driver.name) {
    throw new Error(`${id} must export a name`);
  }

  validateFunction(driver, 'getSchema');
  validateFunction(driver, 'runQuery');
  validateFunction(driver, 'testConnection');
  validateArray(driver, 'fields');

  if (driver.asynchronous) {
    validateFunction(driver, 'cancelQuery');
  }
}
Validate driver implementation
@param {string} id
@param {object} driver