@godzillaba/mutest 1.0.0 → 1.0.1
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.
- package/index.ts +4 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -29,8 +29,11 @@ async function setupWorkers(workerCount: number): Promise<string> {
|
|
|
29
29
|
|
|
30
30
|
async function runGambit(solFiles: string[]): Promise<Mutant[]> {
|
|
31
31
|
await rm("gambit_out", { recursive: true, force: true });
|
|
32
|
+
const { stdout: remappingsRaw } = await execFile("forge", ["remappings"]);
|
|
33
|
+
const remappings = remappingsRaw.trim().split("\n").filter(Boolean);
|
|
34
|
+
const remapArgs = remappings.flatMap((r) => ["--solc_remappings", r]);
|
|
32
35
|
for (const file of solFiles) {
|
|
33
|
-
await execFile("gambit", ["mutate", "--filename", file]);
|
|
36
|
+
await execFile("gambit", ["mutate", "--filename", file, ...remapArgs]);
|
|
34
37
|
}
|
|
35
38
|
const raw = await readFile("gambit_out/gambit_results.json", "utf-8");
|
|
36
39
|
return JSON.parse(raw);
|