@godzillaba/mutest 1.3.2 → 1.3.3

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 (3) hide show
  1. package/README.md +8 -6
  2. package/index.ts +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -15,16 +15,18 @@ Pass one or more Solidity files. Mutest will:
15
15
  3. Run `forge test` against each mutant across the worker copies
16
16
  4. Report which mutants were killed (tests caught them) or survived (coverage gap)
17
17
 
18
- Example output:
18
+ Surviving mutants are written to `gambit_out/survivors.json`.
19
19
 
20
- ```
21
- [KILLED] #1 DeleteExpressionMutation src/Counter.sol
22
- [KILLED] #2 AssignmentMutation src/Counter.sol
23
- [SURVIVED] #3 AssignmentMutation src/Counter.sol
20
+ ### Re-testing survivors
21
+
22
+ Run without arguments to re-test only the survivors from a previous run:
24
23
 
25
- 3 mutants tested: 2 killed, 1 survived
24
+ ```sh
25
+ npx @godzillaba/mutest
26
26
  ```
27
27
 
28
+ This reads `gambit_out/survivors.json` (or falls back to `gambit_out/gambit_results.json`) and re-runs the test suite against those mutants. Useful after improving your tests to check if previously surviving mutants are now caught.
29
+
28
30
  ## Requirements
29
31
 
30
32
  - [Foundry](https://getfoundry.sh/) (`forge`)
package/index.ts CHANGED
@@ -77,7 +77,7 @@ async function processMutants(
77
77
  survivors.push(mutant);
78
78
  } catch {}
79
79
  done++;
80
- process.stdout.write(`\r${done}/${mutants.length} tested`);
80
+ console.log(`${done}/${mutants.length} tested`);
81
81
  }
82
82
  });
83
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@godzillaba/mutest",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "bin": {
5
5
  "mutest": "./index.ts"
6
6
  },