spec-controller 0.1.120 → 0.1.121
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/dist/cli.js +31 -26
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -11788,6 +11788,9 @@ var init_scenarios = __esm({
|
|
|
11788
11788
|
});
|
|
11789
11789
|
|
|
11790
11790
|
// ../core/dist/domain/journal.js
|
|
11791
|
+
function fallbackQualityCheckOf(kind) {
|
|
11792
|
+
return FALLBACK_QUALITY_CHECK[kind];
|
|
11793
|
+
}
|
|
11791
11794
|
function qualityChecksPostedAt(tagNames, fallbackQualityCheck) {
|
|
11792
11795
|
const qualityChecks = [];
|
|
11793
11796
|
for (const name of tagNames) {
|
|
@@ -11827,11 +11830,15 @@ function evidenceOfRunResult(result) {
|
|
|
11827
11830
|
function isFitnessObservation(observation) {
|
|
11828
11831
|
return observation.qualityCheck === "fitness";
|
|
11829
11832
|
}
|
|
11830
|
-
var QUALITY_CHECKS, TIERS;
|
|
11833
|
+
var QUALITY_CHECKS, FALLBACK_QUALITY_CHECK, TIERS;
|
|
11831
11834
|
var init_journal = __esm({
|
|
11832
11835
|
"../core/dist/domain/journal.js"() {
|
|
11833
11836
|
"use strict";
|
|
11834
11837
|
QUALITY_CHECKS = ["fitness", "unit", "integration", "e2e", "performance"];
|
|
11838
|
+
FALLBACK_QUALITY_CHECK = {
|
|
11839
|
+
"test-results": "unit",
|
|
11840
|
+
"scenario-runs": "integration"
|
|
11841
|
+
};
|
|
11835
11842
|
TIERS = new Set(QUALITY_CHECKS.filter((qualityCheck) => qualityCheck !== "fitness" && qualityCheck !== "unit"));
|
|
11836
11843
|
}
|
|
11837
11844
|
});
|
|
@@ -12541,7 +12548,8 @@ var init_scnCitation = __esm({
|
|
|
12541
12548
|
});
|
|
12542
12549
|
|
|
12543
12550
|
// ../core/dist/parse/vitest.js
|
|
12544
|
-
function parseVitestEvidenceObservations(report,
|
|
12551
|
+
function parseVitestEvidenceObservations(report, root) {
|
|
12552
|
+
const qualityCheck = fallbackQualityCheckOf("test-results");
|
|
12545
12553
|
const results = [];
|
|
12546
12554
|
for (const file of report.testResults ?? []) {
|
|
12547
12555
|
const locator = file.name && relativizeToRoot(file.name, root);
|
|
@@ -12593,13 +12601,14 @@ var init_vitest = __esm({
|
|
|
12593
12601
|
});
|
|
12594
12602
|
|
|
12595
12603
|
// ../core/dist/parse/pytest.js
|
|
12596
|
-
function parseJunitEvidenceObservations(report
|
|
12597
|
-
return observationsOf(report,
|
|
12604
|
+
function parseJunitEvidenceObservations(report) {
|
|
12605
|
+
return observationsOf(report, "failed");
|
|
12598
12606
|
}
|
|
12599
|
-
function parsePytestEvidenceObservations(report
|
|
12600
|
-
return observationsOf(report,
|
|
12607
|
+
function parsePytestEvidenceObservations(report) {
|
|
12608
|
+
return observationsOf(report, "never-reached-its-assertions");
|
|
12601
12609
|
}
|
|
12602
|
-
function observationsOf(report,
|
|
12610
|
+
function observationsOf(report, errorResult) {
|
|
12611
|
+
const qualityCheck = fallbackQualityCheckOf("test-results");
|
|
12603
12612
|
return (report.testsuites?.testsuite ?? []).flatMap((suite) => (suite.testcase ?? []).flatMap((testcase) => {
|
|
12604
12613
|
const evidence = evidenceOfRunResult(runResultOf2(testcase, errorResult));
|
|
12605
12614
|
return evidence === void 0 ? [] : [observationOf(suite, testcase, evidence, qualityCheck)];
|
|
@@ -12711,7 +12720,8 @@ var init_pytest = __esm({
|
|
|
12711
12720
|
});
|
|
12712
12721
|
|
|
12713
12722
|
// ../core/dist/parse/rspec.js
|
|
12714
|
-
function parseRspecEvidenceObservations(report,
|
|
12723
|
+
function parseRspecEvidenceObservations(report, root) {
|
|
12724
|
+
const qualityCheck = fallbackQualityCheckOf("test-results");
|
|
12715
12725
|
const results = [];
|
|
12716
12726
|
for (const example of report.examples ?? []) {
|
|
12717
12727
|
const evidence = evidenceOfRunResult(runResultOf3(example.status));
|
|
@@ -12776,13 +12786,13 @@ function ambiguousNote(step) {
|
|
|
12776
12786
|
const text = `${(step.keyword ?? "").trim()} ${step.name ?? ""}`.trim();
|
|
12777
12787
|
return text.length > 0 ? { kind: "ambiguous-step", step: text } : { kind: "ambiguous-step" };
|
|
12778
12788
|
}
|
|
12779
|
-
function parseCucumberEvidenceObservations(report,
|
|
12789
|
+
function parseCucumberEvidenceObservations(report, root) {
|
|
12780
12790
|
const results = [];
|
|
12781
12791
|
for (const feature of report) {
|
|
12782
12792
|
const named = feature.uri ?? feature.name;
|
|
12783
12793
|
const locator = named && relativizeToRoot(named, root);
|
|
12784
12794
|
for (const scenario of feature.elements ?? []) {
|
|
12785
|
-
results.push(...scenarioObservations(scenario, locator
|
|
12795
|
+
results.push(...scenarioObservations(scenario, locator));
|
|
12786
12796
|
}
|
|
12787
12797
|
}
|
|
12788
12798
|
return results;
|
|
@@ -12790,8 +12800,9 @@ function parseCucumberEvidenceObservations(report, fallbackQualityCheck, root) {
|
|
|
12790
12800
|
function citedCodesOf(tagNames) {
|
|
12791
12801
|
return tagNames.map((name) => SCN_TAG.exec(name)).filter((m) => m !== null).map((m) => m[1]);
|
|
12792
12802
|
}
|
|
12793
|
-
function scenarioObservations(scenario, locator
|
|
12803
|
+
function scenarioObservations(scenario, locator) {
|
|
12794
12804
|
const tagNames = (scenario.tags ?? []).map((t) => withoutSigil(t.name ?? ""));
|
|
12805
|
+
const qualityChecks = qualityChecksPostedAt(tagNames, fallbackQualityCheckOf("scenario-runs"));
|
|
12795
12806
|
const { scnId, severalCodes } = attributionOf(citedCodesOf(tagNames));
|
|
12796
12807
|
const severalNotes = severalCodes ? [{ kind: "several-scn-codes", codes: severalCodes }] : [];
|
|
12797
12808
|
const steps = scenario.steps ?? [];
|
|
@@ -12801,7 +12812,7 @@ function scenarioObservations(scenario, locator, fallbackQualityCheck) {
|
|
|
12801
12812
|
if (evidence.broken) {
|
|
12802
12813
|
const ambiguous = steps.find(isAmbiguous);
|
|
12803
12814
|
return [{
|
|
12804
|
-
qualityCheck:
|
|
12815
|
+
qualityCheck: qualityChecks[0],
|
|
12805
12816
|
scnId,
|
|
12806
12817
|
status: evidence.status,
|
|
12807
12818
|
locator,
|
|
@@ -12809,7 +12820,7 @@ function scenarioObservations(scenario, locator, fallbackQualityCheck) {
|
|
|
12809
12820
|
notes: [ambiguousNote(ambiguous), ...severalNotes]
|
|
12810
12821
|
}];
|
|
12811
12822
|
}
|
|
12812
|
-
return
|
|
12823
|
+
return qualityChecks.map((level) => ({
|
|
12813
12824
|
qualityCheck: level,
|
|
12814
12825
|
scnId,
|
|
12815
12826
|
status: evidence.status,
|
|
@@ -29510,7 +29521,7 @@ function runReconcile(reports, root, corpus, workflows) {
|
|
|
29510
29521
|
reconcilerInvocation: RECONCILER_INVOCATION
|
|
29511
29522
|
});
|
|
29512
29523
|
}
|
|
29513
|
-
var
|
|
29524
|
+
var RECONCILER_INVOCATION, DEFAULT_CI_PATH, DEFAULT_PACKAGE_JSON, OBSERVATION_READERS;
|
|
29514
29525
|
var init_ingestQualityChecks = __esm({
|
|
29515
29526
|
"src/ingest/ingestQualityChecks.ts"() {
|
|
29516
29527
|
"use strict";
|
|
@@ -29524,22 +29535,16 @@ var init_ingestQualityChecks = __esm({
|
|
|
29524
29535
|
init_dist3();
|
|
29525
29536
|
init_dist3();
|
|
29526
29537
|
init_dist3();
|
|
29527
|
-
VITEST_QUALITY_CHECK = "unit";
|
|
29528
|
-
PYTEST_QUALITY_CHECK = "unit";
|
|
29529
|
-
JEST_QUALITY_CHECK = "unit";
|
|
29530
|
-
JUNIT_QUALITY_CHECK = "unit";
|
|
29531
|
-
RSPEC_QUALITY_CHECK = "unit";
|
|
29532
|
-
CUCUMBER_QUALITY_CHECK = "integration";
|
|
29533
29538
|
RECONCILER_INVOCATION = "spec-controller balance";
|
|
29534
29539
|
DEFAULT_CI_PATH = ".github/workflows";
|
|
29535
29540
|
DEFAULT_PACKAGE_JSON = "package.json";
|
|
29536
29541
|
OBSERVATION_READERS = {
|
|
29537
|
-
vitest: (report, root) => parseVitestEvidenceObservations(report,
|
|
29538
|
-
pytest: (report) => parsePytestEvidenceObservations(report
|
|
29539
|
-
jest: (report, root) => parseVitestEvidenceObservations(report,
|
|
29540
|
-
junit: (report) => parseJunitEvidenceObservations(report
|
|
29541
|
-
rspec: (report, root) => parseRspecEvidenceObservations(report,
|
|
29542
|
-
cucumber: (report, root) => parseCucumberEvidenceObservations(report,
|
|
29542
|
+
vitest: (report, root) => parseVitestEvidenceObservations(report, root),
|
|
29543
|
+
pytest: (report) => parsePytestEvidenceObservations(report),
|
|
29544
|
+
jest: (report, root) => parseVitestEvidenceObservations(report, root),
|
|
29545
|
+
junit: (report) => parseJunitEvidenceObservations(report),
|
|
29546
|
+
rspec: (report, root) => parseRspecEvidenceObservations(report, root),
|
|
29547
|
+
cucumber: (report, root) => parseCucumberEvidenceObservations(report, root)
|
|
29543
29548
|
};
|
|
29544
29549
|
}
|
|
29545
29550
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.121",
|
|
4
4
|
"description": "Reconcile the behaviour your scenarios name against the evidence that actually ran — the deterministic `balance` CLI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"reconciliation",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"fast-xml-parser": "^5.11.2",
|
|
27
27
|
"ts-json-schema-generator": "^2.9.0",
|
|
28
28
|
"yaml": "^2.9.0",
|
|
29
|
-
"@3f-consulting/spec-controller-core": "0.1.
|
|
29
|
+
"@3f-consulting/spec-controller-core": "0.1.121"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|