Skip to content

Commit 760e096

Browse files
committed
test(metadata-protocol): type the undeclared-key fixture without a cast
Claude-Session: https://claude.ai/code/session_01JQwxbaKY2r8oRQXNGhYHHg Co-authored-by: Claude <noreply@anthropic.com>
1 parent d2c880d commit 760e096

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/metadata-protocol/src/protocol.draft-publish-verdict.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,8 +1141,10 @@ describe('[#29696] a flow read judges a stored legacy D2 row in its D2-converted
11411141
/** The legacy fixture with a config key no conversion rewrites and the parse refuses. */
11421142
const withUndeclaredKey = (name: string, filterKey: 'filters' | 'filter') => {
11431143
const flow = fetchFlow(name, filterKey);
1144-
flow.nodes[1] = { ...flow.nodes[1]!, config: { ...flow.nodes[1]!.config, not_a_config_key: true } } as typeof flow.nodes[number];
1145-
return flow;
1144+
return {
1145+
...flow,
1146+
nodes: flow.nodes.map((n) => (n.id === 'fetch' ? { ...n, config: { ...n.config, not_a_config_key: true } } : n)),
1147+
};
11461148
};
11471149

11481150
async function seeded(body: { name: string }) {

0 commit comments

Comments
 (0)