@binary-balance/seshat 0.5.1 → 0.7.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.
- package/README.md +15 -5
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@ insufficiently tested code.
|
|
|
10
10
|
## What Seshat does
|
|
11
11
|
|
|
12
12
|
- Calculates function complexity and CRAP scores from branch coverage.
|
|
13
|
-
- Changes comparison, logical and
|
|
14
|
-
whether tests detect them.
|
|
13
|
+
- Changes comparison, logical, arithmetic and boolean expressions one at a time
|
|
14
|
+
and checks whether tests detect them.
|
|
15
15
|
- Replaces function bodies to find covered functions whose removal tests miss.
|
|
16
16
|
- Runs tests in isolated copies of the captured project.
|
|
17
17
|
- Produces readable terminal output and versioned JSON, with optional CI thresholds.
|
|
@@ -84,8 +84,11 @@ The [examples](https://github.com/Binary-Balance/seshat/blob/main/examples/READM
|
|
|
84
84
|
and Jest/Expo projects. The [configuration guide](https://github.com/Binary-Balance/seshat/blob/main/docs/configuration.md) covers
|
|
85
85
|
every field, including `workers` for parallel mutation runs.
|
|
86
86
|
|
|
87
|
-
Comparison, logical and
|
|
87
|
+
Comparison, logical, arithmetic and boolean mutants are enabled by default. Set
|
|
88
88
|
`"mutationOperators": ["comparison"]` to retain the operator scope of 0.4.0.
|
|
89
|
+
Use `["comparison", "logical", "arithmetic"]` to retain the scope of 0.5.0 and
|
|
90
|
+
0.6.0. The `boolean` family flips runtime `true`/`false` literals and removes
|
|
91
|
+
prefix `!`, including its boolean conversion.
|
|
89
92
|
The broader default can add test executions and change mutation scores.
|
|
90
93
|
|
|
91
94
|
## Use
|
|
@@ -125,7 +128,8 @@ leaving the non-member outcome untested. Its statement coverage is 100%,
|
|
|
125
128
|
but its branch coverage is 50%. Both measurements appear in the report.
|
|
126
129
|
|
|
127
130
|
The mutation score is the percentage of mutants that made a test fail. A mutant
|
|
128
|
-
|
|
131
|
+
makes one deliberate code change, such as `>` to `>=` or `true` to `false`.
|
|
132
|
+
If tests catch two
|
|
129
133
|
of three mutants, the score is `66.67%`. A timeout or execution error leaves the run
|
|
130
134
|
incomplete and withholds the score. Neither score proves correctness.
|
|
131
135
|
|
|
@@ -142,7 +146,9 @@ Add optional thresholds to `seshat.json`:
|
|
|
142
146
|
```json
|
|
143
147
|
"thresholds": {
|
|
144
148
|
"maxCrap": 30,
|
|
145
|
-
"minMutationScore": 80
|
|
149
|
+
"minMutationScore": 80,
|
|
150
|
+
"maxInferredAny": 10,
|
|
151
|
+
"maxTypeEscapes": 0
|
|
146
152
|
}
|
|
147
153
|
```
|
|
148
154
|
|
|
@@ -153,6 +159,10 @@ Add optional thresholds to `seshat.json`:
|
|
|
153
159
|
| `2` | Invalid input, failed baseline or incomplete run. |
|
|
154
160
|
| `130` / `143` | Cancelled by `SIGINT` / `SIGTERM` on Unix. |
|
|
155
161
|
|
|
162
|
+
`maxInferredAny` limits any-typed runtime expression sites separately in each
|
|
163
|
+
setup. `maxTypeEscapes` limits explicit `any` and TypeScript suppression
|
|
164
|
+
comments across selected source. Both apply in all three commands.
|
|
165
|
+
|
|
156
166
|
See [quality thresholds](https://github.com/Binary-Balance/seshat/blob/main/docs/configuration.md#quality-thresholds) for the full
|
|
157
167
|
rules.
|
|
158
168
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@binary-balance/seshat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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.
|
|
24
|
-
"@binary-balance/seshat-linux-arm64": "0.
|
|
25
|
-
"@binary-balance/seshat-darwin-x64": "0.
|
|
26
|
-
"@binary-balance/seshat-darwin-arm64": "0.
|
|
27
|
-
"@binary-balance/seshat-win32-x64": "0.
|
|
23
|
+
"@binary-balance/seshat-linux-x64": "0.7.0",
|
|
24
|
+
"@binary-balance/seshat-linux-arm64": "0.7.0",
|
|
25
|
+
"@binary-balance/seshat-darwin-x64": "0.7.0",
|
|
26
|
+
"@binary-balance/seshat-darwin-arm64": "0.7.0",
|
|
27
|
+
"@binary-balance/seshat-win32-x64": "0.7.0"
|
|
28
28
|
}
|
|
29
29
|
}
|