supercov 4.12.1 → 4.13.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/docs/coverage-model.md
CHANGED
|
@@ -62,6 +62,20 @@ that the decision is safe.
|
|
|
62
62
|
The same principle applies to Rust, Python, and Ruby boolean expressions and
|
|
63
63
|
control flow.
|
|
64
64
|
|
|
65
|
+
A decision is not only the condition of an `if` or a loop. `&&` and `||` used
|
|
66
|
+
as a value are decisions too:
|
|
67
|
+
|
|
68
|
+
- In Java, Kotlin, Go and Rust every operand is a boolean, so `ok = a && b`
|
|
69
|
+
is a decision over `a` and `b`.
|
|
70
|
+
- In JavaScript, TypeScript, Python and Ruby, `&&` and `||` (`and`/`or`)
|
|
71
|
+
return an operand. The left operand is always tested, and the right one is
|
|
72
|
+
returned, so a compound left operand is the decision: `name = (a && b) ||
|
|
73
|
+
fallback` and `a || b || "default"` each give a decision over `a` and `b`.
|
|
74
|
+
A `!` makes its operand a decision too.
|
|
75
|
+
|
|
76
|
+
Where a Kotlin operand smart-casts the rest of the expression, the
|
|
77
|
+
expression keeps its branch outcomes and is not a decision.
|
|
78
|
+
|
|
65
79
|
## What 100% means
|
|
66
80
|
|
|
67
81
|
Supercov derives the coverage denominator from source structure before the test
|
|
@@ -81,8 +81,9 @@ npx supercov -- sh -c "npm run build && npm test"
|
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
A `pretest` script, or a Playwright `webServer` that builds, does the same.
|
|
84
|
-
When a run fails
|
|
85
|
-
|
|
84
|
+
When a run fails, it names the tests that failed. When none did and the
|
|
85
|
+
project has a `build` script the command does not reach, it says the build
|
|
86
|
+
output may be what is missing. `SUPERCOV_KEEP_WORKSPACE=1` leaves the instrumented copy
|
|
86
87
|
in `.supercov/workspaces/` after a run, to inspect.
|
|
87
88
|
|
|
88
89
|
A package inside a larger git repository (`web/` beside `cmd/`, or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supercov",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.0",
|
|
4
4
|
"description": "Coverage, security and code quality for coding agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coverage",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"eval:skill": "claude plugin eval plugins/supercov --scaffold --trust-plugin --no-publish --model claude-sonnet-5 --judge-model claude-haiku-4-5 --threshold 0.66 --tag behavior trigger --allow-tools Bash Edit Write --max-cost-usd 15",
|
|
84
84
|
"eval:skill-triggers": "claude plugin eval plugins/supercov --scaffold --trust-plugin --no-publish --model claude-sonnet-5 --judge-model claude-haiku-4-5 --threshold 0.66 --tag trigger --ablation none --max-cost-usd 5",
|
|
85
85
|
"test:engine": "cargo fmt --all -- --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace && npm run test:runtime && npm run test:rust-assets && npm run test:engine-integrations",
|
|
86
|
-
"test:engine-integrations": "cargo build -p supercov && node scripts/html-report-integration.mjs && node scripts/rust-process-supervision.mjs && node scripts/rust-direct-node-integration.mjs && node scripts/rust-public-run-integration.mjs && node scripts/rust-embedded-runtime-integration.mjs && node scripts/rust-direct-vitest-integration.mjs && node scripts/rust-direct-jest-integration.mjs && node scripts/mocha-failure-output.mjs && node scripts/failure-output.mjs node ava tap && node scripts/side-by-side.mjs node && node scripts/merge-across.mjs && node scripts/mock-reach.mjs && node scripts/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/cross-origin-requests.mjs && node scripts/leaving-page.mjs && node scripts/shared-page.mjs && node scripts/background-by-time.mjs && node scripts/python-server-playwright.mjs && node scripts/ruby-server-playwright.mjs && node scripts/go-server-playwright.mjs && node scripts/jvm-server-playwright.mjs && node scripts/docker-server-playwright.mjs && node scripts/rust-classic-browser-integration.mjs && node scripts/rust-top-packages-integration.mjs && node scripts/rust-generic-esbuild-integration.mjs && node scripts/rust-generic-tsc-integration.mjs && node scripts/rust-generic-build-matrix.mjs && node scripts/rust-vite-playwright-integration.mjs",
|
|
86
|
+
"test:engine-integrations": "cargo build -p supercov && node scripts/html-report-integration.mjs && node scripts/rust-process-supervision.mjs && node scripts/rust-direct-node-integration.mjs && node scripts/rust-public-run-integration.mjs && node scripts/rust-embedded-runtime-integration.mjs && node scripts/rust-direct-vitest-integration.mjs && node scripts/rust-direct-jest-integration.mjs && node scripts/mocha-failure-output.mjs && node scripts/failure-output.mjs node ava tap && node scripts/side-by-side.mjs node && node scripts/merge-across.mjs && node scripts/mock-reach.mjs && node scripts/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/cross-origin-requests.mjs && node scripts/leaving-page.mjs && node scripts/shared-page.mjs && node scripts/js-syntax-zoo.mjs && node scripts/ruby-syntax-zoo.mjs && node scripts/rust-syntax-zoo.mjs && node scripts/python-syntax-zoo.mjs && node scripts/go-syntax-zoo.mjs && node scripts/java-syntax-zoo.mjs && node scripts/background-by-time.mjs && node scripts/python-server-playwright.mjs && node scripts/ruby-server-playwright.mjs && node scripts/go-server-playwright.mjs && node scripts/jvm-server-playwright.mjs && node scripts/docker-server-playwright.mjs && node scripts/rust-classic-browser-integration.mjs && node scripts/rust-top-packages-integration.mjs && node scripts/rust-generic-esbuild-integration.mjs && node scripts/rust-generic-tsc-integration.mjs && node scripts/rust-generic-build-matrix.mjs && node scripts/rust-vite-playwright-integration.mjs",
|
|
87
87
|
"test:platform": "cargo test --workspace && cargo build -p supercov && node scripts/rust-process-supervision.mjs && node scripts/workspace-crash-integration.mjs",
|
|
88
88
|
"test:native-package": "cargo build --release -p supercov && node scripts/native-package-integration.mjs && node scripts/native-release-set-integration.mjs",
|
|
89
89
|
"test:pypi-wheel": "node scripts/pypi-wheel-integration.mjs",
|
|
@@ -120,14 +120,14 @@
|
|
|
120
120
|
"test:windows-tls": "node scripts/windows-tls-test.mjs"
|
|
121
121
|
},
|
|
122
122
|
"optionalDependencies": {
|
|
123
|
-
"@supercov/cli-darwin-arm64": "4.
|
|
124
|
-
"@supercov/cli-darwin-x64": "4.
|
|
125
|
-
"@supercov/cli-linux-arm64-gnu": "4.
|
|
126
|
-
"@supercov/cli-linux-arm64-musl": "4.
|
|
127
|
-
"@supercov/cli-linux-x64-gnu": "4.
|
|
128
|
-
"@supercov/cli-linux-x64-musl": "4.
|
|
129
|
-
"@supercov/cli-win32-arm64": "4.
|
|
130
|
-
"@supercov/cli-win32-x64": "4.
|
|
123
|
+
"@supercov/cli-darwin-arm64": "4.13.0",
|
|
124
|
+
"@supercov/cli-darwin-x64": "4.13.0",
|
|
125
|
+
"@supercov/cli-linux-arm64-gnu": "4.13.0",
|
|
126
|
+
"@supercov/cli-linux-arm64-musl": "4.13.0",
|
|
127
|
+
"@supercov/cli-linux-x64-gnu": "4.13.0",
|
|
128
|
+
"@supercov/cli-linux-x64-musl": "4.13.0",
|
|
129
|
+
"@supercov/cli-win32-arm64": "4.13.0",
|
|
130
|
+
"@supercov/cli-win32-x64": "4.13.0"
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
133
133
|
"@playwright/test": ">=1.55.0",
|
|
@@ -1697,6 +1697,10 @@ function decodeProbeV2Vector(conditionCount, encoded, outcome) {
|
|
|
1697
1697
|
return remaining === 0 ? { values, outcome } : void 0;
|
|
1698
1698
|
}
|
|
1699
1699
|
function mcdcEndV2(file, decisionIndex, encoded, value) {
|
|
1700
|
+
// Nothing evaluated: a decision used as a value in a tree whose evaluation
|
|
1701
|
+
// never reached it. Every evaluation evaluates its first condition.
|
|
1702
|
+
if (encoded === 0)
|
|
1703
|
+
return value;
|
|
1700
1704
|
const clock = file.clock;
|
|
1701
1705
|
if (clock.fast) {
|
|
1702
1706
|
const seen = file.decisionEpochs[decisionIndex];
|