@godzillaba/mutest 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.ts +5 -1
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -71,11 +71,15 @@ async function processMutants(
71
71
  const workers = queues.map(async (queue, workerIdx) => {
72
72
  const workerDir = `${tempDir}/worker-${workerIdx}`;
73
73
  for (const mutant of queue) {
74
- await cp(`gambit_out/${mutant.name}`, `${workerDir}/${mutant.original}`);
74
+ const dest = `${workerDir}/${mutant.original}`;
75
+ const backup = `${dest}.orig`;
76
+ await cp(dest, backup);
77
+ await cp(`gambit_out/${mutant.name}`, dest);
75
78
  try {
76
79
  await execFile("forge", ["test", "--optimize", "false", "--root", workerDir]);
77
80
  survivors.push(mutant);
78
81
  } catch {}
82
+ await cp(backup, dest);
79
83
  done++;
80
84
  console.log(`${done}/${mutants.length} tested`);
81
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@godzillaba/mutest",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "bin": {
5
5
  "mutest": "./index.ts"
6
6
  },