async function resolve(href, search = [], options = {}) {
  let exists = await fileExists(href, options);
  if (exists) {
    return href;
  }

  for (const ref of search) {
    const checkPath = joinPath(ref, href);
    exists = await fileExists(checkPath, options); /* eslint-disable-line no-await-in-loop */
    if (exists) {
      return checkPath;
    }
  }

  throw new FileNotFoundError(href, search);
}
Resolve path
@param {string} href Path
@param {[string]} search Paths to search in
@param {object} options Critical options
@returns {Promise<string>} Resolves to found path, rejects with FileNotFoundError otherwise