MCPcopy Index your code
hub / github.com/simstudioai/sim / makeBlock

Function makeBlock

apps/sim/lib/webhooks/deploy.test.ts:44–57  ·  view source on GitHub ↗
(
  type: string,
  subBlockValues: Record<string, unknown>,
  canonicalModes?: Record<string, 'basic' | 'advanced'>
)

Source from the content-addressed store, hash-verified

42])
43
44function makeBlock(
45 type: string,
46 subBlockValues: Record<string, unknown>,
47 canonicalModes?: Record<string, 'basic' | 'advanced'>
48): BlockState {
49 const subBlocks: Record<string, { value: unknown }> = {}
50 for (const [key, value] of Object.entries(subBlockValues)) subBlocks[key] = { value }
51 return {
52 id: 'block-1',
53 type,
54 subBlocks,
55 ...(canonicalModes ? { data: { canonicalModes } } : {}),
56 } as unknown as BlockState
57}
58
59describe('buildProviderConfig canonical collapse', () => {
60 beforeEach(() => vi.clearAllMocks())

Callers 1

deploy.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected