function updateSnapshots(snapshotDir, outputFiles) {
  rimraf.sync(snapshotDir);
  Object.entries(outputFiles).forEach(([filename, code]) => {
    const filePath = path.join(snapshotDir, filename);
    mkdirp.sync(path.dirname(filePath));
    fs.writeFileSync(path.join(snapshotDir, filename), code);
  });
}
Updates snapshots on the filesystem.

@param {string} snapshotDir
@param {{ [key: string]: string }} outputFiles