INNER CODE UNIT · TypeScript

checkExographProjects

exograph/exograph · error-report-testing/src/index.ts:68

function checkExographProjects(directories: string[]): Array<Failure> {
  let failedProjects: Array<Failure> = [];

  directories.forEach(directory => {
    console.log("Checking", directory);
    const expectedErrorFilePath = path.join(directory, 'error.txt');
    const actualErrorPath = expectedErrorFilePath + ".new";

    const result = spawnSync(exo_executable, ['build'], {
      cwd: directory, stdio: 'pipe',
    });

    if (result.status != 0) {
      const actualErrors = result.stderr.toString();
      fs.writeFileSync(actualErrorPath, actualErrors, 'utf-8');

      if (fs.existsSync(expectedErrorFilePath)) {
        let diff = diffFiles(expectedErrorFilePath, actualErrorPath);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…