function renderScript(script, args = [], opts = {}) {
  const { cwd = __dirname } = opts;

  return render(
    resolve(__dirname, "../node_modules/.bin/nyc"),
    ["--silent", "node", script, ...args],
    {
      cwd,
      spawnOpts: {
        env: { ...process.env, NODE_ENV: "test" },
      },
    },
  );
}
@param {String} script
@param {Array} args
@param {Object} opts