function checkOutputSource(snapshotDir, outputFiles) {
  Object.entries(outputFiles).forEach(([file, code]) => {
    const filePath = path.join(snapshotDir, file);
    if (!fs.existsSync(filePath)) {
      throw new Error(`Did not find file ${filePath} in snapshot output. Is it new?`);
    }

    if (fs.statSync(filePath).isDirectory()) {
      throw new Error(`File at ${filePath} in snapshot is a directory, expected a file.`);
    }

    const snapshotCode = fs.readFileSync(filePath, 'utf-8');
    expect(snapshotCode).to.equal(code, `File output at: ${filePath} differs from snapshot: `);
  });
}
@param {string} snapshotDir
@param {{ [key: string]: string }} outputFiles