MCPcopy Create free account
hub / github.com/simstudioai/sim / buildTable

Function buildTable

apps/sim/app/api/table/[tableId]/delete-async/route.test.ts:66–82  ·  view source on GitHub ↗
(overrides: Partial<TableDefinition> = {})

Source from the content-addressed store, hash-verified

64import { POST } from '@/app/api/table/[tableId]/delete-async/route'
65
66function buildTable(overrides: Partial<TableDefinition> = {}): TableDefinition {
67 return {
68 id: 'tbl_1',
69 name: 'People',
70 description: null,
71 schema: { columns: [{ name: 'status', type: 'string' }] },
72 metadata: null,
73 rowCount: 1000,
74 maxRows: 1_000_000,
75 workspaceId: 'workspace-1',
76 createdBy: 'user-1',
77 archivedAt: null,
78 createdAt: new Date(),
79 updatedAt: new Date(),
80 ...overrides,
81 }
82}
83
84function makeRequest(body: unknown, tableId = 'tbl_1') {
85 const req = new NextRequest(`http://localhost:3000/api/table/${tableId}/delete-async`, {

Callers 1

route.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected