executable-stories-formatters 1.13.0 → 1.14.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/dist/cli.js +30 -23
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +25 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +27 -20
- package/dist/index.js.map +1 -1
- package/package.json +15 -15
- package/schemas/scenario-index-v1.json +9 -1
package/dist/index.d.cts
CHANGED
|
@@ -1655,6 +1655,20 @@ interface ScenarioIndex {
|
|
|
1655
1655
|
summary: StoryReport["summary"];
|
|
1656
1656
|
scenarios: ScenarioIndexItem[];
|
|
1657
1657
|
}
|
|
1658
|
+
/**
|
|
1659
|
+
* One scenario as this formatter emits it.
|
|
1660
|
+
*
|
|
1661
|
+
* This is an OUTPUT type: it describes what `toScenarioIndex` produces, which
|
|
1662
|
+
* is why `hash` and `assertionState` are required here while
|
|
1663
|
+
* `scenario-index-v1.json` marks both optional. The schema is deliberately the
|
|
1664
|
+
* laxer of the two so artifacts written before either field existed still
|
|
1665
|
+
* validate; every artifact written since carries them.
|
|
1666
|
+
*
|
|
1667
|
+
* The consequence, and it is intended: parsing an arbitrary v1 file and casting
|
|
1668
|
+
* it to this type is not sound for those two fields. Validate against the
|
|
1669
|
+
* schema and treat them as optional if you are reading files you did not just
|
|
1670
|
+
* write.
|
|
1671
|
+
*/
|
|
1658
1672
|
interface ScenarioIndexItem {
|
|
1659
1673
|
id: string;
|
|
1660
1674
|
title: string;
|
|
@@ -1681,6 +1695,12 @@ interface ScenarioIndexItem {
|
|
|
1681
1695
|
message: string;
|
|
1682
1696
|
stack?: string;
|
|
1683
1697
|
};
|
|
1698
|
+
/**
|
|
1699
|
+
* Whether the scenario's claim was checked: `asserted`, `unasserted`, or
|
|
1700
|
+
* `unobserved` where the adapter cannot count. A passing scenario that is
|
|
1701
|
+
* `unasserted` ran and proved nothing.
|
|
1702
|
+
*/
|
|
1703
|
+
assertionState: "asserted" | "unasserted" | "unobserved";
|
|
1684
1704
|
}
|
|
1685
1705
|
interface ScenarioIndexStep {
|
|
1686
1706
|
id: string;
|
|
@@ -1691,6 +1711,11 @@ interface ScenarioIndexStep {
|
|
|
1691
1711
|
durationMs: number;
|
|
1692
1712
|
errorMessage?: string;
|
|
1693
1713
|
docKinds: string[];
|
|
1714
|
+
/**
|
|
1715
|
+
* Assertions the framework observed. Absent means the adapter has no counter;
|
|
1716
|
+
* `0` means it counted none. Never defaulted — the difference is the point.
|
|
1717
|
+
*/
|
|
1718
|
+
assertions?: number;
|
|
1694
1719
|
}
|
|
1695
1720
|
interface ScenarioIndexFilters {
|
|
1696
1721
|
statuses?: TestStatus$1[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1655,6 +1655,20 @@ interface ScenarioIndex {
|
|
|
1655
1655
|
summary: StoryReport["summary"];
|
|
1656
1656
|
scenarios: ScenarioIndexItem[];
|
|
1657
1657
|
}
|
|
1658
|
+
/**
|
|
1659
|
+
* One scenario as this formatter emits it.
|
|
1660
|
+
*
|
|
1661
|
+
* This is an OUTPUT type: it describes what `toScenarioIndex` produces, which
|
|
1662
|
+
* is why `hash` and `assertionState` are required here while
|
|
1663
|
+
* `scenario-index-v1.json` marks both optional. The schema is deliberately the
|
|
1664
|
+
* laxer of the two so artifacts written before either field existed still
|
|
1665
|
+
* validate; every artifact written since carries them.
|
|
1666
|
+
*
|
|
1667
|
+
* The consequence, and it is intended: parsing an arbitrary v1 file and casting
|
|
1668
|
+
* it to this type is not sound for those two fields. Validate against the
|
|
1669
|
+
* schema and treat them as optional if you are reading files you did not just
|
|
1670
|
+
* write.
|
|
1671
|
+
*/
|
|
1658
1672
|
interface ScenarioIndexItem {
|
|
1659
1673
|
id: string;
|
|
1660
1674
|
title: string;
|
|
@@ -1681,6 +1695,12 @@ interface ScenarioIndexItem {
|
|
|
1681
1695
|
message: string;
|
|
1682
1696
|
stack?: string;
|
|
1683
1697
|
};
|
|
1698
|
+
/**
|
|
1699
|
+
* Whether the scenario's claim was checked: `asserted`, `unasserted`, or
|
|
1700
|
+
* `unobserved` where the adapter cannot count. A passing scenario that is
|
|
1701
|
+
* `unasserted` ran and proved nothing.
|
|
1702
|
+
*/
|
|
1703
|
+
assertionState: "asserted" | "unasserted" | "unobserved";
|
|
1684
1704
|
}
|
|
1685
1705
|
interface ScenarioIndexStep {
|
|
1686
1706
|
id: string;
|
|
@@ -1691,6 +1711,11 @@ interface ScenarioIndexStep {
|
|
|
1691
1711
|
durationMs: number;
|
|
1692
1712
|
errorMessage?: string;
|
|
1693
1713
|
docKinds: string[];
|
|
1714
|
+
/**
|
|
1715
|
+
* Assertions the framework observed. Absent means the adapter has no counter;
|
|
1716
|
+
* `0` means it counted none. Never defaulted — the difference is the point.
|
|
1717
|
+
*/
|
|
1718
|
+
assertions?: number;
|
|
1694
1719
|
}
|
|
1695
1720
|
interface ScenarioIndexFilters {
|
|
1696
1721
|
statuses?: TestStatus$1[];
|