Skip to content

Commit 32d1de4

Browse files
committed
test(lint): a comprehension variable named like a list field is accepted at a flow condition
Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh Co-authored-by: Claude <noreply@anthropic.com>
1 parent 94d6c7a commit 32d1de4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packages/lint/src/validate-expressions.list-equality-36167.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ describe('publish lint — list-equality at a CEL site', () => {
141141
expect(errors[0].message).toContain(` in ${reference}`);
142142
});
143143

144-
it.each(["stage == 'frontend'", "owner == 'u1'", "'frontend' in labels", 'watchers != null'])(
144+
it.each([
145+
"stage == 'frontend'", "owner == 'u1'", "'frontend' in labels", 'watchers != null',
146+
// A comprehension variable named like a list field holds one item: per row.
147+
"record.labels.exists(watchers, watchers == 'frontend')",
148+
"record.labels.all(labels, labels != 'qa')",
149+
])(
145150
'CONTROL — accepts the flow start condition %s',
146151
(condition) => {
147152
expect(flowErrors(condition)).toEqual([]);

0 commit comments

Comments
 (0)