assertEntry = (allegedEntry, url) => {
  const entry = Object(allegedEntry);
  assert(
    allegedEntry === entry && !Array.isArray(entry),
    `"entry" must be an object in compartment map, got ${allegedEntry} in ${q(
      url,
    )}`,
  );
  const { compartment, module, ...extra } = entry;
  assertEmptyObject(
    extra,
    `"entry" must not have extra properties in compartment map, got ${q(
      Object.keys(extra),
    )} in ${q(url)}`,
  );
  assert.typeof(
    compartment,
    'string',
    `entry.compartment must be a string in compartment map, got ${compartment} in ${q(
      url,
    )}`,
  );
  assert.typeof(
    module,
    'string',
    `entry.module must be a string in compartment map, got ${module} in ${q(
      url,
    )}`,
  );
}
@param {unknown} allegedEntry
@param {string} url