Skip to content

Commit d0789bc

Browse files
committed
test(workflows): match the added loop by shape, which the loose state type allows
1 parent d042838 commit d0789bc

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎apps/sim/lib/workflows/editing/operations.test.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,12 @@ describe('a falsy loop or parallel count', () => {
619619
expect(validationErrors).toEqual([
620620
expect.objectContaining({ blockType: 'loop', field: 'iterations', value: iterations }),
621621
])
622-
const added = Object.values(state.blocks).find((block) => block.name === 'Loop 2')
623-
expect(added?.data?.count).toBeUndefined()
622+
expect(Object.values(state.blocks)).toContainEqual(
623+
expect.objectContaining({
624+
name: 'Loop 2',
625+
data: expect.not.objectContaining({ count: expect.anything() }),
626+
})
627+
)
624628
})
625629

626630
it('refuses count 0 on an added parallel', () => {

0 commit comments

Comments
 (0)