assertModules = (allegedModules, path, url) => {
  const modules = Object(allegedModules);
  assert(
    allegedModules === modules || !Array.isArray(modules),
    `modules must be an object, got ${q(allegedModules)} in ${q(url)}`,
  );
  for (const [key, value] of Object.entries(modules)) {
    assertModule(value, `${path}.modules[${q(key)}]`, url);
  }
}
@param {unknown} allegedModules
@param {string} path
@param {string} url