Skip to content

Commit f631e40

Browse files
committed
test(serializer): type the missing-required-field fixture as BlockState
1 parent e3d6098 commit f631e40

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎apps/sim/serializer/index.test.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
import { describe, expect, it, vi } from 'vitest'
2626
import { DAGBuilder } from '@/executor/dag/builder'
2727
import { Serializer } from '@/serializer/index'
28+
import type { BlockState } from '@/stores/workflows/workflow/types'
2829
import { getToolMetadata, getToolParams } from '@/tools/metadata'
2930

3031
vi.mocked(getToolMetadata).mockImplementation(toolsMetadataMock.getToolMetadata)
@@ -454,12 +455,15 @@ describe('Serializer', () => {
454455

455456
it.concurrent('attributes a missing required field to the block that lacks it', () => {
456457
const serializer = new Serializer()
457-
const waitBlockMissingRequired: any = {
458+
const waitBlockMissingRequired: BlockState = {
458459
id: 'wait-block',
459460
type: 'wait',
460461
name: 'Wait Block',
461462
position: { x: 0, y: 0 },
462-
subBlocks: { timeValue: { value: '' }, timeUnit: { value: 'seconds' } },
463+
subBlocks: {
464+
timeValue: { id: 'timeValue', type: 'short-input', value: '' },
465+
timeUnit: { id: 'timeUnit', type: 'dropdown', value: 'seconds' },
466+
},
463467
outputs: {},
464468
enabled: true,
465469
}

0 commit comments

Comments
 (0)