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

Function buildTable

apps/sim/app/api/table/[tableId]/rows/route.test.ts:53–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51import { GET, POST } from '@/app/api/table/[tableId]/rows/route'
52
53function buildTable(): TableDefinition {
54 return {
55 id: 'tbl_1',
56 name: 'People',
57 description: null,
58 schema: {
59 columns: [
60 { id: 'col_aaa', name: 'Name', type: 'string' },
61 { id: 'col_bbb', name: 'Age', type: 'number' },
62 ],
63 },
64 metadata: null,
65 rowCount: 0,
66 maxRows: 100,
67 workspaceId: 'workspace-1',
68 createdBy: 'user-1',
69 archivedAt: null,
70 createdAt: new Date('2024-01-01'),
71 updatedAt: new Date('2024-01-01'),
72 }
73}
74
75function authAs(authType: 'session' | 'internal_jwt') {
76 hybridAuthMockFns.mockCheckSessionOrInternalAuth.mockResolvedValue({

Callers 1

route.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected