Skip to content

Commit b34f480

Browse files
committed
test(cli): the typed child-result check fixture keeps only the response it asserts on
1 parent dbfe808 commit b34f480

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

‎packages/sim-cli/src/commands/protocol/stored-edges.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,12 @@ export interface WorkflowFolderRecords {
156156
/**
157157
* The `.sim/stored-edges.json` write of each workflow folder a workspace get or apply answered
158158
* with, each compiled against the catalog its base names and typed as the server printed it: a
159-
* call by the result fields of the folder it calls ({@link childResultFields}), as a check types it. A workflow holding a type the workspace
160-
* catalog lacks was printed with its own catalog: one not cached yet is fetched, once per distinct
161-
* hash, and cached, so an offline check compiles that folder against it too. The records are a
162-
* cache fill, never part of the write: a catalog fetch that fails skips the folders printed with
163-
* that catalog (named in `unrecorded`) rather than failing a write the server already committed.
159+
* call by the result fields of the folder it calls ({@link childResultFields}), as a check
160+
* types it. A workflow holding a type the workspace catalog lacks was printed with its own
161+
* catalog: one not cached yet is fetched, once per distinct hash, and cached, so an offline check
162+
* compiles that folder against it too. The records are a cache fill, never part of the write: a
163+
* catalog fetch that fails skips the folders printed with that catalog (named in `unrecorded`)
164+
* rather than failing a write the server already committed.
164165
*/
165166
export async function workflowFolderRecords(
166167
client: OperationClient<'getSourceCatalog'>,

‎packages/sim-cli/src/commands/protocol/workspace-source-check.test.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,11 +588,9 @@ describe('sim workspaces source check', () => {
588588
workflowFile(
589589
"const start = trigger.start('Start', { inputFormat: { phone: 'string' } })",
590590
"const call = runWorkflow('Call', { workflowId: childWorkflow('normalize-phone'), inputMapping: { phone: start.phone } })",
591-
"const save = table.insertRow('Save', { tableId: table('contacts'), data: { email: call.result.data.mobile } })",
592591
"const reply = response('Reply', { body: { mobile: call.result.data.mobile, digits: call.result.data.digits, other: call.result.data.missing } })",
593592
'start.to(call)',
594-
'call.to(save)',
595-
'save.to(reply)'
593+
'call.to(reply)'
596594
)
597595
)
598596

0 commit comments

Comments
 (0)