@binary-balance/seshat 0.4.0 → 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.
- package/README.md +10 -5
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
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 [
|
|
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
|
|
13
|
+
- Changes comparison, logical and arithmetic operators one at a time and checks
|
|
14
|
+
whether tests detect them.
|
|
14
15
|
- Replaces function bodies to find covered functions whose removal tests miss.
|
|
15
16
|
- Runs tests in isolated copies of the captured project.
|
|
16
17
|
- Produces readable terminal output and versioned JSON, with optional CI thresholds.
|
|
@@ -83,6 +84,10 @@ The [examples](https://github.com/Binary-Balance/seshat/blob/main/examples/READM
|
|
|
83
84
|
and Jest/Expo projects. The [configuration guide](https://github.com/Binary-Balance/seshat/blob/main/docs/configuration.md) covers
|
|
84
85
|
every field, including `workers` for parallel mutation runs.
|
|
85
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
|
+
|
|
86
91
|
## Use
|
|
87
92
|
|
|
88
93
|
```sh
|
|
@@ -120,13 +125,13 @@ leaving the non-member outcome untested. Its statement coverage is 100%,
|
|
|
120
125
|
but its branch coverage is 50%. Both measurements appear in the report.
|
|
121
126
|
|
|
122
127
|
The mutation score is the percentage of mutants that made a test fail. A mutant
|
|
123
|
-
is one changed
|
|
124
|
-
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
|
|
125
130
|
incomplete and withholds the score. Neither score proves correctness.
|
|
126
131
|
|
|
127
132
|
`check` and `mutate` also replace eligible function bodies to detect pseudo-tested
|
|
128
133
|
functions, those whose body replacement tests miss despite positive coverage.
|
|
129
|
-
These flags and counts are separate from the
|
|
134
|
+
These flags and counts are separate from the operator mutation score. `mutate`
|
|
130
135
|
collects fresh coverage to skip unexecuted functions; it does not apply CRAP
|
|
131
136
|
thresholds. Extreme mutation uses replacement even with experimental switching.
|
|
132
137
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@binary-balance/seshat",
|
|
3
|
-
"version": "0.
|
|
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.
|
|
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.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
|
}
|