From 5cefe05ff192a1c6b6abd66b174637d39062efc2 Mon Sep 17 00:00:00 2001 From: David Goss Date: Mon, 17 Nov 2025 08:01:06 +0000 Subject: [PATCH 1/4] update types --- src/types.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/types.ts b/src/types.ts index 52c4a81..1cd60b1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -471,6 +471,10 @@ export interface AssembledTestCase { * A unique identifier for this test case */ id: string + /** + * The id of the pickle from which this test case is derived + */ + pickleId: string /** * A non-unique name for this test case * @remarks From 13d82ce32da91c0557402af72361a06e8e7de2d1 Mon Sep 17 00:00:00 2001 From: David Goss Date: Mon, 17 Nov 2025 08:02:01 +0000 Subject: [PATCH 2/4] include when making plan --- src/makeTestPlan.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/makeTestPlan.ts b/src/makeTestPlan.ts index 8846d29..5089405 100644 --- a/src/makeTestPlan.ts +++ b/src/makeTestPlan.ts @@ -52,6 +52,7 @@ export function makeTestPlan( const location = query.findLocationOf(pickle) as MessagesLocation return { id: newId(), + pickleId: pickle.id, name: strategy.reduce(lineage, pickle), sourceReference: { uri: pickle.uri, @@ -65,7 +66,7 @@ export function makeTestPlan( toMessage() { return { id: this.id, - pickleId: pickle.id, + pickleId: this.pickleId, testSteps: this.testSteps.map((step) => step.toMessage()), testRunStartedId, } From 59625ed4fb6915aacff0ff76248a4f1553b971c4 Mon Sep 17 00:00:00 2001 From: David Goss Date: Mon, 17 Nov 2025 08:07:17 +0000 Subject: [PATCH 3/4] update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a17df9..a09c05b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Include `pickleId` in `AssembledTestCase` ([#26](https://github.com/cucumber/javascript-core/pull/26)) ## [0.5.1] - 2025-09-17 From f5197d1aa8b23a2668af1f6c3dc9bf4565084806 Mon Sep 17 00:00:00 2001 From: David Goss Date: Mon, 17 Nov 2025 08:09:49 +0000 Subject: [PATCH 4/4] update API export --- cucumber-core.api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/cucumber-core.api.md b/cucumber-core.api.md index a433a84..8b96c5f 100644 --- a/cucumber-core.api.md +++ b/cucumber-core.api.md @@ -30,6 +30,7 @@ export class AmbiguousError extends Error { export interface AssembledTestCase { id: string; name: string; + pickleId: string; sourceReference: SourceReference; testSteps: ReadonlyArray; toMessage(): TestCase;