@binary-balance/seshat 0.3.1 → 0.5.0

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/README.md +16 -4
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -4,13 +4,15 @@
4
4
 
5
5
  A native code-assurance tool for TypeScript and TSX, written in Rust. Seshat
6
6
  combines function-level [CRAP](https://testing.googleblog.com/2011/02/this-code-is-crap.html)
7
- analysis with [comparison-operator mutation testing](https://en.wikipedia.org/wiki/Mutation_testing) to find complex and/or
7
+ analysis with [operator mutation testing](https://en.wikipedia.org/wiki/Mutation_testing) to find complex and/or
8
8
  insufficiently tested code.
9
9
 
10
10
  ## What Seshat does
11
11
 
12
12
  - Calculates function complexity and CRAP scores from branch coverage.
13
- - Changes comparison operators one at a time and checks whether tests detect them.
13
+ - Changes comparison, logical and arithmetic operators one at a time and checks
14
+ whether tests detect them.
15
+ - Replaces function bodies to find covered functions whose removal tests miss.
14
16
  - Runs tests in isolated copies of the captured project.
15
17
  - Produces readable terminal output and versioned JSON, with optional CI thresholds.
16
18
  - Supports explicit source selection, multiple test setups and parallel mutation workers.
@@ -82,6 +84,10 @@ The [examples](https://github.com/Binary-Balance/seshat/blob/main/examples/READM
82
84
  and Jest/Expo projects. The [configuration guide](https://github.com/Binary-Balance/seshat/blob/main/docs/configuration.md) covers
83
85
  every field, including `workers` for parallel mutation runs.
84
86
 
87
+ Comparison, logical and arithmetic mutants are enabled by default. Set
88
+ `"mutationOperators": ["comparison"]` to retain the operator scope of 0.4.0.
89
+ The broader default can add test executions and change mutation scores.
90
+
85
91
  ## Use
86
92
 
87
93
  ```sh
@@ -119,10 +125,16 @@ leaving the non-member outcome untested. Its statement coverage is 100%,
119
125
  but its branch coverage is 50%. Both measurements appear in the report.
120
126
 
121
127
  The mutation score is the percentage of mutants that made a test fail. A mutant
122
- is one changed comparison, such as `>` to `>=`. If tests catch two of three
123
- mutants, the score is `66.67%`. A timeout or execution error leaves the run
128
+ is one changed operator, such as `>` to `>=` or `&&` to `||`. If tests catch two
129
+ of three mutants, the score is `66.67%`. A timeout or execution error leaves the run
124
130
  incomplete and withholds the score. Neither score proves correctness.
125
131
 
132
+ `check` and `mutate` also replace eligible function bodies to detect pseudo-tested
133
+ functions, those whose body replacement tests miss despite positive coverage.
134
+ These flags and counts are separate from the operator mutation score. `mutate`
135
+ collects fresh coverage to skip unexecuted functions; it does not apply CRAP
136
+ thresholds. Extreme mutation uses replacement even with experimental switching.
137
+
126
138
  ## Use in CI
127
139
 
128
140
  Add optional thresholds to `seshat.json`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@binary-balance/seshat",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "description": "A native CLI for TypeScript and TSX complexity analysis and mutation testing.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,10 +20,10 @@
20
20
  "LICENSE"
21
21
  ],
22
22
  "optionalDependencies": {
23
- "@binary-balance/seshat-linux-x64": "0.3.1",
24
- "@binary-balance/seshat-linux-arm64": "0.3.1",
25
- "@binary-balance/seshat-darwin-x64": "0.3.1",
26
- "@binary-balance/seshat-darwin-arm64": "0.3.1",
27
- "@binary-balance/seshat-win32-x64": "0.3.1"
23
+ "@binary-balance/seshat-linux-x64": "0.5.0",
24
+ "@binary-balance/seshat-linux-arm64": "0.5.0",
25
+ "@binary-balance/seshat-darwin-x64": "0.5.0",
26
+ "@binary-balance/seshat-darwin-arm64": "0.5.0",
27
+ "@binary-balance/seshat-win32-x64": "0.5.0"
28
28
  }
29
29
  }