removeModules(modules = []) {
    let removed = 0
    const keys = Object.keys(require.cache)
    for (const mod of modules) {
      for (const key of keys) {
        if (key.includes(mod) === false) {
          continue
        }
        delete require.cache[key]
        removed += 1
      }
    }
    return removed
  }
Removes explicitly named modules from the require cache.

@param {string[]} modules

@returns {number} The number of cache entries removed.