(options: TableRowFactoryOptions = {})
| 50 | * Creates a table row fixture with sensible defaults. |
| 51 | */ |
| 52 | export function createTableRow(options: TableRowFactoryOptions = {}): TableRowFixture { |
| 53 | const timestamp = new Date().toISOString() |
| 54 | |
| 55 | return { |
| 56 | id: options.id ?? `row_${generateShortId(8)}`, |
| 57 | data: options.data ?? {}, |
| 58 | position: options.position ?? 0, |
| 59 | createdAt: options.createdAt ?? timestamp, |
| 60 | updatedAt: options.updatedAt ?? timestamp, |
| 61 | } |
| 62 | } |
nothing calls this directly
no test coverage detected